I understand what mmap is but that isn't the problem.

Each peer uses too much memory. Has nothing to do with the mechanics of
mmap.

Its using memory for nothing.

This is my rtorrent stats atm: virt: 969m res: 340m shared: 9.9m

There is only 1 torrent active, uploading to 1 peer at 180kb/s.

Where in gods name is all that memory being used? Its even using the swap
for pagecache. Whats the point of swapping file cache?

I used to run utorrent and it had no problems with memory, cpu was sky high
though because of wine.

If i leave rtorrent on it will bring my server down with massive swap usage
for no active torrents.

On Jan 3, 2008 12:34 AM, Jari Sundell <[EMAIL PROTECTED]> wrote:

> In Incognito wrote:
> > The memory issue im talking about is
> > http://libtorrent.rakshasa.no/ticket/641.
> >
> > Most of my torrents have 2mb - 4mb piece sizes. And from watching
> > rtorrent it uses 3xPiece size for EVERY peer. This apparently does not
> > change even if you are just seeding. I have been playing around with
> > max_memory_usage and each peer in seed mode uses 3x the piece size.
> >
> > This is an absurd way of using memory. Most people connect to around 50
> > peers. Assuming there is absolutely nothing else loaded then ONE torrent
> > needs 300mb. ONE.
> >
> > Now if piece sizes are 4mb, and alot of torrents are, then you even more
> > memory for ONE torrent.
> >
> > Max_memory_usage is not a solution because the same structure is being
> > used. In fact without any sort of peer selection speeds suffer
> > tremendously. Im not sure why this hasn't been addressed. Since the last
> > release there have been nothing but petty changes and the addition of
> > someone else's DHT patch.
>
> The ticket has gotten little attention because the sky is, in fact, not
> actually falling. Even If you use capital letters.
>
> If someone ported rtorrent to Windows, you would have been amazed at how
> rtorrent never went above 10mb. Because it is a unix program using mmap,
> you end up seeing the rather symptomatic high file cache use
> , shared by all BT clients, getting reported.
>
> If I were to fix this by mapping smaller piece sizes, all that would
> change is the memory reported, not the memory actually used. Which is
> why the ticket is not considered high priority. The only people who
> would be affected by this, is people who are hitting the _virtual_
> memory limit.
>
> I did fix that problem by making it unmap the least used chunks quite a
> while ago, so hitting the virtual memory limit shouldn't cause that much
> problems.
>
> As Josef mentioned, use upload/download limits and use
> max_{up,down}loads_{div,global} to make rtorrent use fewer peers. This
> should reduce the amount of mapped memory.
>
> Jari Sundell
>
_______________________________________________
Libtorrent-devel mailing list
Libtorrent-devel@rakshasa.no
http://rakshasa.no/mailman/listinfo/libtorrent-devel

Reply via email to