Jump to content

Windows caching problems (+solution for developers)


fmot

Recommended Posts

I'm experiencing a problem that when using uTorrent the memory is totally used, wiping out all the other applications to swap. Maybe you've already heard about this symptom and I know that there is no such problem with 1.8.* versions… However 1.8.* does not work well with my favorite tracker. So please make some changes to uTorrent 1.7.7 (as it's the best torrent client I've seen ^^).

The cause of problem is that CreateFile api function is called with FILE_FLAG_RANDOM_ACCESS flag. When given this hint Windows tries to keep all the file inside cache. If the file is big enough (some gigabytes) the user will run out of memory for other needs, all the programs memory will be swapped out crippling the system finally.

Please refer to this page for a good explanation of different flags for CreateFile function:

http://www.uwe-sieber.de/ntcacheset_e.html

(you may quickly search for "FILE_FLAG_RANDOM_ACCESS")

So please just call CreateFile api without this flag specified. It should solve the problem.

Link to comment
Share on other sites

It's not about disabling caching... It's just about to change the way the windows API function is called. All I want to say is that it's not the right way to call this function. The information I posted above is for developers. I debugged uTorrent, put a breakpoint on CreateFile and saw that it was called with this flag turned on. As I posted above all that I want - just to remove the flag. It just requires 1 minute to search and replace. And I guarantee that nothing will become worse.

And you said it's not a bug... So how to call it? My 4GB system becomes _completely_ unusable after some minutes of heavy downloading (2-3 MB/s) of some big (4-8 GB) file. I have to push reset button. Guys, it's a bug! Maybe microsoft is also guilty for that as it allowed such a use without providing proper warnings...

Can I talk to somebody in develop team directly?

Link to comment
Share on other sites

You know it's already fixed in 1.8, but you don't realize how many bugs there were associated with the Windows cache disabling that had to be ironed out. It's not as simple a fix as you may think.

The 1.7.x branch is in maintenance mode only now -- only pressing security fixes get backported to the 1.7.x builds.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...