Jump to content

22708 bug: memory usage


Ersan

Recommended Posts

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
10359 ARGGG 20 0 2689m 2.5g 1280 S 65 31.4 13:00.22 utserver
10733 darkmani 20 0 2086m 1.8g 1280 S 55 23.2 5:18.46 utserver

I have some utserver processes using insane amounts of system memory, the first one using 2.5GB and the second 1.8GB - I believe it does this when a large torrent has just completed but I will check again. The latest episode crashed the entire server.

Link to comment
Share on other sites

Yes upon further testing this is reproducable by having an extremely fast download link (60MB/s in my tests). It eats a ton of memory during the download (grows to up to 4GB in my tests) and when it completes it will hang at 99.9% completed and consume even more memory, then it never frees the memory.

Using net.low_cpu stops this from happening but it limits the download speed to around 11MB/s, I'm not sure if it directly affects the memory usage issue or if it doesn't occur only because of the lower throughput.

There are some processes using net.low_cpu that are consuming large amounts of ram (around 400MB) and will become unresponsive at times - I'm looking into the reproducing that.

Link to comment
Share on other sites

Yes upon further testing this is reproducable by having an extremely fast download link (60MB/s in my tests). It eats a ton of memory during the download (grows to up to 4GB in my tests) and when it completes it will hang at 99.9% completed and consume even more memory, then it never frees the memory.

The only time I've seen excessive memory usage like that is on some embedded devices, except that the memory used in those cases is not owned by the program - it is very likely used by the kernel for disk write buffers that have yet to be flushed to disk. Memory owned by the program stays at a reasonable level (a few percent) in those cases. Also, this occurs on devices that have nowhere near the amount of memory on your computer(s), and slower hardware.

Using net.low_cpu stops this from happening but it limits the download speed to around 11MB/s, I'm not sure if it directly affects the memory usage issue or if it doesn't occur only because of the lower throughput.

There are some processes using net.low_cpu that are consuming large amounts of ram (around 400MB) and will become unresponsive at times - I'm looking into the reproducing that.

I created an item on the todo list to test with download rates that high. The highest I've been testing with is about 22 MB/sec peak.

Link to comment
Share on other sites

  • 3 months later...

My VPS only has 256MB of ram, but I decided to use utorrent as it has always been good to me in terms of memory usage. I used to use WebGUI with utorrent in wine and it was relatively problem free, but wasted a lot of memory by having to run X and wine. Now I have tried everything from increasing disk cache, to disabling it. I have check the low CPU flag, limited the download rate reduced the number of connections, and tried a few other things. But no mater what I find utorrent's memory usage slowly creeping up. I don't even have to be downloading. I had a torrent sitting in finished state, and still found my memory usage on utorrent to be increasing. If I let it go the memory gets so high that everything goes ungodly slow. My apache starts to lock up and it takes me 10 minutes to close utorrent over SSH. I find myself having to use htop to kill the server about once a day and restart it. It'd be really nice to see this fixed.

Also, in case it's relivent I'm running CentOS 5.5 on a VPS using XEN virtualization with 2 cores of a Xion processor dedicated to me. Also I was experiencing the 100% CPU issue too until I activated the low CPU flag, but it still seems higher than it should be.

Link to comment
Share on other sites

My VPS only has 256MB of ram

That should be enough, although my experience with minimum memory is with embedded devices not VMs.

But no mater what I find utorrent's memory usage slowly creeping up. I don't even have to be downloading. I had a torrent sitting in finished state, and still found my memory usage on utorrent to be increasing. If I let it go the memory gets so high that everything goes ungodly slow. My apache starts to lock up and it takes me 10 minutes to close utorrent over SSH. I find myself having to use htop to kill the server about once a day and restart it. It'd be really nice to see this fixed.

This is with memory that is directly associated with the utserver process, not memory usage in general? Sounds like it is associated with the utserver process, especially if no download activity is occurring. I mentioned my experience with memory on embedded devices in an earlier post in this thread.

Also, in case it's relivent I'm running CentOS 5.5 on a VPS using XEN virtualization with 2 cores of a Xion processor dedicated to me. Also I was experiencing the 100% CPU issue too until I activated the low CPU flag, but it still seems higher than it should be.

It may be relevant. Is CentOS 5.5 32-bit or 64-bit and which are you running? Right now there's no support for 64-bit OSes (including running the 32-bit build using the 32-bit libraries on a 64-bit OS) until I produce a 64-bit build. There's one subsystem that needs to be made 64-bit clean (causes a fault and memory corruption under heavy load) that an engineer is working on right now.

Link to comment
Share on other sites

I am running i386 or 32 bit yes. The memory is all associated with utserver process. When I run htop it tends to show the full 256MB being used. The utserver process is shown 4 times, perhaps due to threading? The rate of increase is slow, but it takes over after a while. I usually see it adding about 1 MB of ram to the total every 10 or so minutes, and once it consumes the full it starts taking swap. I don't have a constant monitor on my server, so I don't notice my ram is gone until I try to load a page in apache and it takes a really long time to load and it times out. Typically when this happens I SSH in and kill utserver with htop. My ram usage drops instantly from 256MB to 32MB. As I stated before this seems to occur whether I'm downloading or not, although I haven't been able to test with an empty list as my server is currently downloading a 220GB torrent with only 20GB of harddrive space (I'm doing a segmented kind of download, downloading 30-40 of the files at a time, deleting them, setting them to skip and doing the next segment). The server is my primary use for torrents as my university doesn't allow P2P traffic, but is ok with SFTP traffic. Besides that everything seems to be working fine. The only other thing I notice is that utserver is taking a lot of CPU time compared to other clients I have used. Right now my server has been up for about 2 hours, has used over 1 hour of CPU time and is currently using 30MB of ram. Typically I will see it max my ram usage after about 30-40 hours of uptime.

Also I'm using WebUI 0.380 WIM if that is important.

Link to comment
Share on other sites

Based on the results up to now it seems to be hovering around 40MB yay! I thing adding the daemon flag fixed the problem. i will keep the monitoring going though and keep you posted.

Edit: just checked the log and there is definitely a memory leak. It's up to 90MB of ram now with 167M of Virtual memory. I hope the log may help you guys determine what the leak is and fix it in the next release. The link is in my previous post.

Also some additional information this is with one torrent in the queue, but it is currently in finished state.

Edit: Uptime is now 2 days. memory usage is up to 128MB with 257MB of Virtual memory.

Link to comment
Share on other sites

It appears I have been unable to reproduce the problem of utorrent eating all of my ram. It tends to sit between 80-128MB now. Wish I could be more useful in troubleshooting the large ram eating issue or figure out exactly what caused it, but it's left me clueless. Whether the daemon flag is set or not, the memory is still large, but it's at least not all of it.

I was hoping to make available a more recent build today, but two of the test computers powered down over the long weekend, so I'll start over today

I'm excited. Every new build is another step closer to a stable release and (hopefully) getting bakabt to whitelist it :)

Link to comment
Share on other sites

I use Windows but the problem is the same (the one with rapid RAM eating, not with slow but sure), so I'll write here.

I seem to have localized the problem: when a file is checked after an unexpected closing of uTorrent (and I suppose after a download is finished), it seems to be put into memory wholly, but the memory isn't owned by uTorrent.exe - it must be some system thing not shown in Task Manager - maybe, as it was said here before, disk read buffer, although I've tried turning off read buffering (both Windows' and uTorrent's); after the file is checked the memory is freed.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...