Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to simulate a reboot in Win7 for testing application cold-start time

In order to measure application' cold-start time, I have to reboot my machine every time, which is really time-consuming. I understand it is mission impossible to simulate a real reboot, but what I want is something rough, ex, put out cache in standby list as many as possible so the warm start won't be so warm anymore.

Any ideas on this?

Thanks

like image 768
Baiyan Huang Avatar asked Jul 08 '10 09:07

Baiyan Huang


2 Answers

A virtual machine would be your best bet. The virtual machine will provide a clean slate for the app, but it will be much quicker to reload the virtual machine image than your physical machine.

like image 87
C. Ross Avatar answered Oct 19 '22 15:10

C. Ross


The most efficient way to do this is with RamMap.exe from www.sysinternals.com. This application not only allows you to monitor your memory usage, it also allows you to clear the different memory areas such as the working sets, the standby lists so you can test things like memory mapped i/o performance and eliminate cache effects on subsequent reads to better simulation the 1st time read performance after a reboot. It takes some time to clear, but nowhere near the time it takes to reboot.

like image 30
Dennis Ward Avatar answered Oct 19 '22 14:10

Dennis Ward