OT: Page File Configuration

J

JKop

Here's my setup:

WinXP Pro
Pentium III 550MHz
128MB RAM
12GB Hard Disk, of which about 4GB is free.


I've just recently been reading about virtual memory... anyway: I've got two
spare hard disks, both of them are 1GB. I here that the general rule of
thumb is to spread the page file equally among all hard disks. I'm wondering
if I'd be better off just splitting it between my two spare hard disks, that
way my main hard disk won't be thrashing all the time? One thing to note
here is that I'd say my 12GB disk is a good bit faster at accessing than the
other two disks.

Any advice? I'm looking to improve performance!

I'm going to defragment my main hard disk and sort out the page file config,
as most of time when my machine pauses it's messing with the hard disk.


-JKop
 
J

Jyrki Alakuijala

If you have to use Windows for large scale c++ compilation
work, you need to have two things correctly setup:

- fixed-sized page file (min and max are the same)
- (almost) daily defragmentation schedule

Windows fragments its file system very rapidly and you will
easily lose more than 50% of compilation time without these
precautionary actions. Some windows machines I have seen
had been very unstable before defragmentation. For example,
one machine could not be shutdown properly before it was
defragmented about 5 times in a row using a commercial
defragmenting software.

If you can setup multiple partitions, it may be a good idea
to do the compilation work on a different partition to where
the programs are installed on. This way only the partition
where the compilations are done gets fragmented quickly and
other partitions are fragmented at a slower pace. This
speeds up the defragmentation process.

Setting up the LargeSystemCache flag may speed up your
compilations further:

Windows (not XP):
Use registry editor:
HKLM\System\CurrentControlSet\Control\Session Manager\Memory Management
LargeSystemCache = 1

Windows XP:
1. Right click My Computer
2. Select Properties
3. Click Advanced
4. Choose Performance
5. Click Advanced again
6. Select System Cache under Memory Usage.

The default settings are optimized for maximally fast startup
of powerpnt.exe and are less than optimal for compilation.
In Linux, compilation is mostly a CPU bound task, but in Windows
you may easily end up waiting for the hard disk head movement.
Setting up the system cache mitigates this a bit, but still
it seems that file caching is not as efficient as in Linux or
Unix machines.

I suspect that fragmentation is beneficial for the makers of
Windows software. When the user installs a new version, Windows
appears to work faster (less fragmentation) and the reward for
buying new Windows versions is higher for the normal user (who
does not understand defragmentation). Thus, there is no
commercial incentive to fix it. However, heavy compilation
work fragments the harddisks a bit too fast (possibly within a
week or two) and make the system seem a bit ridiculous.

Further, the precompiled headers mechanism, which defaults to on
in Microsoft Visual C++, may turn against itself in compilation
speeds of large projects. Generally, having large sets of includes
in every implementation file leads to spagetti design and .PCH push
the development team to that direction. Often, spagetti code
compiles slower than cleaner design.
 
V

Victor Bazarov

Jyrki said:
If you have to use Windows [...]

I would really prefer that such flame baits did not get posted
here, even with the "OT" marker. But that's just MHO...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,780
Messages
2,569,611
Members
45,286
Latest member
ChristieSo

Latest Threads

Top