Partager via


How to constrain your server?

Today our team wanted to perform load testing our application on a low end server. The server we have is of 8 proc, 16 GB RAM and 64bit configuration. We wanted to load test our application multiple times by making it run on different number of processors and different amount of physical memory each time.

To constrain processor, the Initial idea was to setting the processor affinity to the application process through task manager or sys internal's process explorer tool. But the idea became invalid as the OS and other services that support our application may be using all other processors as we are setting affinity to our application process only. Our test team members felt that, this case may not simulate the real time environment. So we left this idea.

Then we have found out the tool "Consume.exe" that is shipped with VS.NET 8.0 tools directory. Consume.exe can block the following resources.

  1. Physical memory
  2. Page file
  3. Disk space
  4. CPU time
  5. Kernel pool

It is a good tool that can eat all the mentioned resources and make the application to use only the remaining resources. Our team members suspected that, with this approach, there could be unknown factors that would influence our application's performance in negative / positive way. This tool can be used to simulate a situation where other applications also runs along with your application. So we had to leave this idea also as our application is server application and it would be running alone in the server.

 
 

Finally found out one good approach that was accepted by all of our team members. That was nothing but modifying boot.ini file. So we used the following switches from boot.ini file for our requirement.

/NUMPROC = 1

/MAXMEM = 1024

After modifying and rebooting the system, the OS was showing / utilizing only the mentioned amount of resources. To read more about other switches and its details refer Technet site.

Comments