Link to home
Start Free TrialLog in
Avatar of Robert Burns
Robert Burns

asked on

Swap File Size

I have a user who is enthusiastic about performance, and wants to optimize his swap file size to make the system faster/more responsive.

The system in question is your typical "power user box" PIII400+, 256mb running NT4.  The user runs apps like AutoCAD (often with many and/or very large drawings), and some accessory SQL stuff.  It's connected to a mixed network <nt/novell> and all data is kept on the servers.

A goal of this station is to have it tweaked "for the quarter mile", by which I mean that this station is used more for finite intense usage periods with many large cad files and sql stuff going on at once, rather than an "email, minsweeper, and writing letters" station.

The current ideas I've listened to and bring here for your consideration are:
Make the swap file a fixed size (setting the min/max to the same value).
Make the swap file incredibly large - say... 1 or 2 gig

Thoughts?
Avatar of AdamWoodland
AdamWoodland

yes, you should make the swap size constant.

yes, maybe 1GB. It depends on who you speak to and what you do with the machine, but you generally go 2 or 3 times the size of your RAM.

also, put the page file on its own partition (FAT16, as it is fastest but will not be C2 compliant or secure) at the end of the disk, this will ensure the best (in my opinion) access to the swap file.

If you don't want to do the last option, choose to use a defragmenter that defragments the page file (Diskeeper is what I use). This should also speed up the access.

Of course, now that memory has dropped to its lowest prices since last May, another 256MB would also be good for the machine (providing it can take it) as you said that the machine will be used heavily.

What graphics card have you got? if, as you said you are doing alot of CAD, would a better graphics card with more memory and more processing power help.

Another step further...upgrade the hard disk to SCSI, depending on what you get, it can increase disk data throughput by 3 times. (This will mean a reinstall of Windows, or use of disk cloning software).

All things to think about when getting a fast machine that will be used heavily. Hope this helps and perhaps get someother 'experts' opinions as to speed it up.
ASKER CERTIFIED SOLUTION
Avatar of Tim Holman
Tim Holman
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Forgot to say, out of the above, we make the page file constant, set it to a value relevent to our system (~500MB) and wherever possible put the page file only on a FAT16 drive, whenever we set up machines to send out to clients.
The ideal is not bad in theory, it's all depends what is the maximum size the Swap file has been use? Remember file system always reading the Whole file at once, if the file is too large, it take times to complete reading it.

Talk about performance, how about implement SCSI with multiple HD as Strip Set or with Parity, place the Swap file there and sure things go fast with 256MB Ram

Another cheaper coption is get an extra HD, only place the Swap file there, it help on performance too.
Swap space isn't where you'll speed up the box.  Generally, speaking about the SQL portion of his tasks at least, you don't actually want the machine to use the swap.  Yes, the swap should be sized right so you don't run out of swap space when it's handling loads but if his computer is actually using most of the swap that you set up for him you want to look further into his setup and apps to see what you can do to get them to run more efficiently.  Heavy largescale swap usage is indicative of gross ineffeciency somewhere.

I set swap min and max to the same number, for servers it's 2 X RAM plus 12 and for workstations 1.5 X RAM.  If the server is a SQL 7 server running English querying, make that 3 X RAM.

Does he have more than one drive?  You'll get better performance if you place your OS files on one physical disk and your programs on another physical disk. For a bigger step up, the programs could be installed on a RAID 5 array.  I just built out a system today with databases on RAID 5 array, OS on RAID 1 and a seperate physical disk with the swap on it.  That tripled the speed right there and I haven't even begun to tweak SQL.

There's a lot online at the Microsoft Technet site to assist with performance boosts.

Side note to AdamWoodland - why is FAT 16 faster?
No idea, that's what I have read from a couple of sources on the web (I'll try to remember one for another post), I also have been told this information from a couple of experienced engineers here at work at different times.

Thats how my machine is set up along with other people in the groups. It is also how we set up machines for use by customers (might be FAT32 thinking about it, but definately FAT).

I'l try and find the supporting information sometime.
You can maximize performance of swap to locate swap files on different disks conneceted to different interfaces.

Set minimum as 256MB (recommended size for your configuration). Set maximum that big as your disk space allow. If your FS is NTFS then size of paging file increase automatically as needed.

Optimal way proposed by Tim Holman: "...to monitor swapfile size over a week or so, and set the new swapfile size to be the biggest you've ever seen it."

Not good idea use power station as SQL Server. Server must be server, powerstation must be powerstation.
Avatar of Robert Burns

ASKER

I've set of the performance monitor to show the 'redline' of the swapfile - going to let this user run for a couple days and see what happens.  Thanks for the advice as always.