Refreshing a pagefile size is really a question for Microsoft rather than here.
The page file is used for virtual memory, and if it is increasing as you say then you are probably trying to run too much at the same time. So the answer is to use less memory.
Try running fewer programs at the same time, and make sure your code is written efficiently. For example, avoid reading a whole file into an array unless you really have to. Break-up monolithic code into subroutines using lexical (my) variables. Benchmark and profile your code to find the areas using the most memory and work on those.
Without specific examples we cannot give anything other than general (and obvious) comments like this. | [reply] |
Thanks for valuable reply.
I understood your comments. My server contains 4 GB RAM. If the page file size is around 3.5 GB then the server was hanged. page file size 400 MB when the server is restarted. Is there any option to reduce this page file usage automatically or clear page file while running the server.
Thanks
Suresh
| [reply] |
Is there any option to reduce this page file usage automatically or clear page file while running the server.
This is a Microsoft Windows system administrator's question. My guess is: "no chance". If you reduced the page file size then what would you expect to happen with the data that is lost? Windows cannot guess which areas of memory you no longer need, that is up to the programmer (you).
| [reply] |
I don't think you quite understand exactly what the pagefile is. I'd suggest doing some reading (starting with RAM, Virtual Memory, Pagefile and all that stuff and moving on from there if required) before messing around with any of these settings. I've only ever seen the pagefile being purged on reboot (set up via a registry key), the argument for this was to clear out any unencrpyted data which may have been stored there by certain applications.
Martin
| [reply] |
I agree with cdarke, profile your code using something like Devel::NYTProf first, you may have some optimization work to do within your Perl code. Perhaps if you describe how your app is designed, what it does and any data it uses more advice could be given (posting a cut down version which replicates the issue would help). Failiing that you could install more RAM in your system and leave the OS to manage virtual memory.
Martin
| [reply] |