Jump to content

uTorrent 1.7.7 flushes RAM cache when minimized (on Windows)


zOOm_ER

Recommended Posts

To save life to HDD very useful will be a RAM caching ability of uTorrent.

But the problem is that uTorrent flushes RAM cache when minimized (to tray or to taskbar) and need to refill it again, which again leads to bothering HDD. Actually uTorrent does not do this explicitly, this is done by Windows.

here are screenshots:

before minimize (more than 100Mb RAM used):

http://img442.imageshack.us/img442/4585/21598200il0.jpg

and just after minimize (about 6M used):

http://img442.imageshack.us/img442/2175/33393867lo5.jpg

Microsoft already described how to solve this problem in http://support.microsoft.com/default.aspx?scid=kb;en-us;293215

"If an application minimizes its top-level window programmatically by calling the ShowWindow() API with the SW_MINIMIZE command, the working set of the process will be trimmed. However, the working set will not be trimmed when the window is programmatically minimized through the use of ShowWindow() with the SW_SHOWMINIMIZED command."

"To solve this, the window procedure for the top-level window should intercept the WM_SYSCOMMAND message and respond to the SC_MINIMIZE command by calling ShowWindow() directly with the SW_SHOWMINIMIZED command. It should NOT pass the SC_MINIMIZE command on to DefWindowProc(). "

P.S. thanks to developers for great tool ;)

Link to comment
Share on other sites

>If you say so. I have that option disabled, increase cache size, disable remove blocks... and I don't "lose" the cache when I minimize.

jewelisheaven, are you sure you look at Working Set, when check for cache flushing, and not Virtual Set size (which of course is not modified) ?

And option "Reduce memory cache when not needed" is turned off (with it cache size is not overrided at all). This option does not solve Windows OS native working set flushing.

>Caching doesn't reduce wear on hard drives really. It's a performance thing.

2 Firon:

Well, if i set 2G RAM cache and will seed files about same size, hard disk is untouched at all. This is very useful, if i am seedindg too popular torrents with too old HDD (otherwise it will be dead in few days)

Link to comment
Share on other sites

Not VRAM? My mistake. My point stands though. The cache is not emptied no matter what column in process explorer you look. It's still there buffering data for me no matter how long I leave it minimized. You can't use 2 gigs of RAM as cache anyway, unless you're on 64-bit Windows. You failed to mention that :P

Link to comment
Share on other sites

>Not VRAM? My mistake. My point stands though. The cache is not emptied no matter what column in process explorer you look. It's still there buffering data for me no matter how long I leave it minimized.

jewelisheaven, can you make screenshots of it?

I added two to first post of this topic, and there bug can be viewed in process explorer window.

I must notice, that bug applies to all programms, that unaware of this: http://support.microsoft.com/default.aspx?scid=kb;en-us;293215 . And uTorrent is among them.

>You can't use 2 gigs of RAM as cache anyway, unless you're on 64-bit Windows. You failed to mention that

32-bit systems limit RAM size to 2^32 = 4GB

Link to comment
Share on other sites

uhm... no? uT used to crash over something like 1250 MB of cache due to the VRAM increasing past the 2 Gig limit.

Screenshot of what? We're apparently talking about two separate things. You're not talking about the disk cache... OR I'm a sod for forgetting I was testing with 1.8 >< You don't even need Process Explorer... you will see in Task Manager how when you minimize the uT window the "Mem Usage" reverts to minimal (I think it's the base RAM uT uses) but the VM Size is unchanged. VM includes the cache uT uses, and you can verify yourself the Cache does not disappear through Speed tab -> Disk Statistics.

Please check your findings with 1.8 found in the http://utorrent.com/download.php ... you can run it with /RECOVER to not have to stop the OTHER uT, AND run it http://utorrent.com/faq.php#How_can_I_share_my_torrents_between_user_profiles.3F so you don't alter your existing working 1.7 settings

Link to comment
Share on other sites

3 with /3GB.

But utorrent will crash somewhere over 1GB, before it reaches 2. At least, some versions did, not sure if it does anymore...

But uh, the pages of the cache likely won't be lost when it does this, since ut will reclaim them pretty quickly.

This does not mean that the memory pages used by the process are immediately discarded from RAM. In fact, these pages may remain resident for quite a while. They are simply flagged so that the system can use them for other processes as necessary. This is significantly faster than waiting on the system's standard trimming algorithm.
Link to comment
Share on other sites

Archived

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

×
×
  • Create New...