Confirmed users, Bureaucrats and Sysops emeriti
2,088
edits
(→Rob Arnold notes on simulated cold startup on Windows: My experiences) |
|||
| (9 intermediate revisions by 2 users not shown) | |||
| Line 41: | Line 41: | ||
</pre> | </pre> | ||
The purge command on Linux, <tt>echo 3> /proc/sys/vm/drop_caches</tt>, requires root privileges. [ddahl via adw] | |||
== Startup post on dev-apps-firefox== | == Startup post on dev-apps-firefox== | ||
| Line 143: | Line 144: | ||
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management\PrefetchParameters | HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management\PrefetchParameters | ||
</pre> | </pre> | ||
(sorry, I remembered wrong. -- sid0) | |||
The default value of the <tt>EnablePrefetcher</tt> key is 3 (on XP at least). [adw] | The default value of the <tt>EnablePrefetcher</tt> key is 3 (on XP at least). [adw] | ||
(it's the same on Vista/7 -- sid0) | |||
=== adw's Windows XP experience === | === adw's Windows XP experience === | ||
The notes above point to three tools for | The notes above point to three tools for purging disk cache on Windows: | ||
* [http://technet.microsoft.com/en-us/sysinternals/bb897561.aspx CacheSet] from Microsoft | * [http://technet.microsoft.com/en-us/sysinternals/bb897561.aspx CacheSet] from Microsoft | ||
** Uses a system call to request that the working set of the system's cache be cleared. | |||
* [http://twpol.dyndns.org/weblog/2009/07/29/01 purge.exe] from Silver | * [http://twpol.dyndns.org/weblog/2009/07/29/01 purge.exe] from Silver | ||
** This appears to be equivalent to CacheSet. | ** This appears to be equivalent to CacheSet. | ||
* [http:// | * [http://chadaustin.me/2009/04/flushing-disk-cache/ flushmem.exe] from Chad Austin | ||
Chad Austin | ** Allocates memory in 64 KiB chunks until it can't anymore, and then writes to each page, forcing older pages out to the page file. | ||
I noticed no difference between starting Firefox warm and starting it after using both CacheSet and purge.exe. Whatever they may do, combined with disabled prefetch they | I noticed no difference between starting Firefox warm and starting it after using both CacheSet and purge.exe. Whatever they may do, combined with disabled prefetch they are not sufficient to simulate cold startup. | ||
After using flushmem.exe, Firefox starts up in about the same time it takes for it to startup cold, but it ground my system to a halt for nearly ten minutes. | After using flushmem.exe, Firefox starts up in about the same time it takes for it to startup cold, but it ground my system to a halt for nearly ten minutes. | ||
| Line 164: | Line 170: | ||
<pre> | <pre> | ||
[12:06pm] dietrich: vlad: what's the recommended way to force cold-start on windows? | [12:06pm] dietrich: vlad: what's the recommended way to force cold-start on windows? | ||
[12:08pm] vlad: all the stuff that people suggested doesn't work | [12:08pm] vlad: all the stuff that people suggested doesn't work | ||
[12:08pm] vlad: with cacheset/purge/etc. | [12:08pm] vlad: with cacheset/purge/etc. | ||
| Line 176: | Line 181: | ||
</pre> | </pre> | ||
Quoting a Microsoft [http://tester.poleyland.com/ software tester] on this [http://social.msdn.microsoft.com/forums/en-US/softwaretesting/thread/d4729488-d610-45bc-bea9-4f8e3e59c62d/ MSDN forum thread]: | |||
<blockquote> | |||
This is actually a very complicated thing to do, and to do it correctly, these are some of the things you need to worry about: | |||
* Invalidating the CPU caches | |||
* Invalidating the cache on the storage media | |||
* Invalidating the OS's read cache (note that this is not the same as the write cache which can be flushed with [http://technet.microsoft.com/en-us/sysinternals/bb897438.aspx Sync.exe] via [http://msdn2.microsoft.com/en-us/library/aa364439.aspx FlushFileBuffers]) | |||
* Removing items from the OS's KnownDLL cache ([http://blogs.msdn.com/larryosterman/archive/2004/07/19/187752.aspx Larry], [http://support.microsoft.com/kb/164501 KB]) | |||
* Removing items from the CLR JIT compilation cache (.NET apps only) | |||
</blockquote> | |||