Welcome to Symantec Connect.  Log in or register to participate.
Login to participate
Endpoint Management & Virtualization DownloadsRSS

VBScript That Will Set the Pagefile Size

pcalver's picture

Here is a VBScript that we use to set the pagefile on desktop/laptop systems when we are building them in Deployment Solution.

This will figure out the amount of physical RAM in the system, then set the initial and maximum size to 1.5 times the physical RAM. It will set a maximum of 4gb. It doesn't change the drive that contains the page file since this is specifically directed toward our desktop/laptop systems.

Download the VBScript.txt and save it as setpagefile.vbs to a share on your network, then create a job in Deployment Solution to run the VBScript following these screen shots.

Right click on job folder to create a “New Job”

Add a “Run Script” task to the job

Type the location of the VBScript in “Run the script from file:”

You may have to specify a user that has rights to the share

Click Finish

Add a reboot (Power Control) for this to take effect

Select Restart (we always select force applications…) and click finish.

The result should be a job with two tasks.

License: AJSL
By clicking the download link below, you agree to the terms and conditions in the Altiris Juice Software License
Support: User-contributed tools on the Juice are not supported by Altiris Technical Support. If you have questions about a tool, please communicate directly with the author by visiting their profile page and clicking the 'contact' tab.
EdT's picture

Why not just set the control

Why not just set the control of the page file to system managed? This will then set the size of the page file AUTOMATICALLY to 1.5 times the installed RAM, and the figure will automatically change if you add or remove RAM in the future. The following regkey sets the page file size to system managed:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management]
"PagingFiles"=hex(7):43,00,3a,00,5c,00,70,00,61,00,67,00,65,00,66,00,69,00,6c,\
  00,65,00,2e,00,73,00,79,00,73,00,20,00,30,00,20,00,30,00,00,00,00,00

pcalver's picture

Here is an exert from an

Here is an exert from an article I found.  There are a many more out there like it.  This is also what I learned when I got my MSCE a long time ago.

Make its initial size as big as the maximum size. Although this will cause the Pagefile to occupy more HD space, we do not want it to start off small, then having to constantly grow on the HD. Writing large files (and the Pagefile is indeed large) to the HD will cause a lot of disk activity that will cause performance degradation. Also, since the Pagefile only grows in increments, you will probably cause Pagefile fragmentation, adding more overhead to the already stressed HD.

System managed does the following:
...minimum size is equivalent to 1.5 times the amount of RAM on your system, and 3 times that figure for the maximum size.

Patrick
Sacramento Municipal Utility District