ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

Main Area and Open Discussion > General Software Discussion

NTFS Compression hack under XP - is it safe and is it worth implementing?

<< < (2/2)

Well, a word of caution: these datasets were very small, so do keep in mind that there's going to be some fluctuation. You'd need to test on larger datasets before measuring CPU time taken - also note that I didn't do any affinity limiting either, further introducing risk of inaccuracy.

Obviously decompression isn't going to be free, but I doubt it's going to be more than a few percent actually (compression is certainly going to be more expensive than decompression though).

Dunno about the bytes read - that _is_ interesting... ought to do some more intensive testing and more than just a single test run for each case. I wonder if there's some way to ask Windows to discard it's filesystem cache, instead of resorting to the "allocate all physical memory" trick. Rebooting the system between each test run _IS_ too tedious :)

Carol Haynes:
There must be a way to flush the cache ... coding snack?

This thread may be of interest:

EDIT ...Does this utility do the job?

Clearing the Cache's Working Set
You can force the Cache to release all of it's pages by pressing the Clear button. Note that the Cache can grow again as necessary, and that this is not the same as flushing the Cache - pages that were assigned to it are simply made available to other programs and can be reclaimed by the Cache.
--- End quote ---

Will have a look at that carol, thanks.

Flushing write cache is easy, but I didn't/don't know of a way to empty the read cache...

Carol Haynes:
That utility seems to flush the system cache - not the read cache.

I haven't tried it - what are the consequences of flushing the system cache while windows is running - presumably it should all take care of itself with a certain amount of disk thrashing as Windows grabs back essential files to the cache from disk?

"clear" from cacheset didn't seem to do much about read cache. Memory usage goes down, but then starts going up again - timings from md5sum'ing a ~500meg file clearly shows that the file is still cached, though.

Dunno if the sysinternals forum thread helps anything either, even if I did a FlushFileBuffers() on all file handles in the system, I'm pretty sure that only takes care of flushing the write buffers (at least according to MSDN/PlatformSDK).


[0] Message Index

[*] Previous page

Go to full version