Quieter _and_ faster: a simple tip

Silencing hard drives, optical drives and other storage devices

Moderators: NeilBlanchard, Ralf Hutter, sthayashi, Lawrence Lee

Felger Carbon
Posts: 2049
Joined: Thu Dec 15, 2005 11:06 am
Location: Klamath Falls, OR

Quieter _and_ faster: a simple tip

Post by Felger Carbon » Fri Feb 24, 2006 3:12 pm

Do you have two HDDs in your computer? I do. Originally, I installed the second drive so I could do periodic full backups using Ghost. Then, if a drive failed again I'd only lose a coupla day's data. Later, I got a tip from someplace that my OS would run faster if the swap file was assigned to a partition on the second drive. So I did that and forgot about it.

Recently, seeking lower noise, I decided to use just one HDD, and to depend on periodic CDR backups. So I reorganized my system accordingly. Two things happened that were completely unexpected (by me). First, my system got a lot slower (with the swap file on the same drive). Second, I began to hear a lot of disk seeks! And I wasn't used to hearing disk seeks at all.

In retrospect, what happened was entirely predictable. With the swap file on the same drive, a _lot_ of disk seeking was going on. Same-disk swaps are 6X slower, judging by Ghost copying to the same drive. With the swap file on another disk, there's almost no disk seeks during a swap - and it turns out that my Win98SE(512MB) does an awful lot of swapping.

So: if you have two HDDs, you really should have your swap file on the second drive. And if you hate hearing disk seeks and having a slow computer, you might consider trying a second drive and see how that works out. Besides, regular backups via Ghost are a good thing. :wink:

sonuvbob
Posts: 78
Joined: Mon May 30, 2005 12:17 pm

Post by sonuvbob » Fri Feb 24, 2006 5:41 pm

Disabling the swap file's an option too, if you have enough RAM. Some things might not run without a swap file though (Quake2's the only one I remember outright refusing to run).

Felger Carbon
Posts: 2049
Joined: Thu Dec 15, 2005 11:06 am
Location: Klamath Falls, OR

Post by Felger Carbon » Sat Mar 04, 2006 2:28 pm

Hmm. Only need 2nd disk for swap file. True, lose all the disk seek noise with swap file on disk 1. But disk #2 does need vibration isolation, etc. How to move swap file off disk 1 yet not introduce any other noise?

Simple. Some sort of 2GB EDisk or RamDisk. There used to be such a thing as EDisk, but I can't find it for sale anywhere.

The itty bitty USB flash disks are too slow for this use. What I want/need is a device that looks just like an IDE HDD but with no moving mechanical parts. The data need not be retained when power goes off, since this is only for swap file use.

Anybody know of something like that what can be bought today? :)

TomZ
Posts: 386
Joined: Tue Feb 07, 2006 2:59 pm

Post by TomZ » Sat Mar 04, 2006 2:51 pm

It would probably be more effective to add more DRAM to the system and disable the swap file.

iatacs19
Posts: 31
Joined: Fri Jul 29, 2005 5:29 am

Post by iatacs19 » Sun Mar 05, 2006 11:20 am

You should never disable the swap file in windows, Windows is designed to use the swap file regardless of that amount of RAM.

TomZ
Posts: 386
Joined: Tue Feb 07, 2006 2:59 pm

Post by TomZ » Sun Mar 05, 2006 9:07 pm

iatacs19 wrote:You should never disable the swap file in windows, Windows is designed to use the swap file regardless of that amount of RAM.
Please provide some details/reasons.

I have 2GB of memory in my system, and I have disabled the swap file (virtual memory setting). It seems to run normal.

Also, I would submit that if running this way is as you suggest, something that should never be done, the WinXP user interface wouldn't allow you to change that setting. It even allows you to disable it without even so much as a warning. The online help for WinXP contains no warnings about that either.

Mr Evil
Posts: 566
Joined: Fri Jan 20, 2006 10:12 am
Location: UK
Contact:

Post by Mr Evil » Mon Mar 06, 2006 4:47 am

I have in the past come across some appplications that refuse to run if they don't detect a swapfile. Otherwise it shouldnt' cause any problems (as long as you don't run out of RAM of course!).

Windows is notoriously poor at managing the swapfile, so disabling it can yield a massive performance increase. I would disable mine, except I sometimes need more than the physical 2GB of RAM that I have.

I split my swapfile between all three of my drives, since Windows is able to spread the load across multiple swapfiles, improving performance.

NoNameFace
Posts: 25
Joined: Sat Jan 15, 2005 5:21 am
Location: The Netherlands

Post by NoNameFace » Tue Mar 07, 2006 4:53 am

sonuvbob wrote:Disabling the swap file's an option too, if you have enough RAM. Some things might not run without a swap file though (Quake2's the only one I remember outright refusing to run).
No, no, no.

Please, everyone, educate yourselves here:
http://episteme.arstechnica.com/eve/ubb ... 9002352731

TomZ
Posts: 386
Joined: Tue Feb 07, 2006 2:59 pm

Post by TomZ » Tue Mar 07, 2006 5:15 am

I am naturally suspicious of advice given on sites like those that are referenced. I looked for something authoritative on Microsoft's web site regarding this, but I couldn't find anything.

I'm currently running with no virtual memory (swap file / paging file) here with WinXP Pro and 2GB DRAM. I'll report back with any problems if they crop up. I'm a pretty intense user, with 10-20 apps typically running. If there is an issue, I'm sure it will crop up pretty quickly.

As I said earlier, if this was such a clearly bad thing to do, Windows wouldn't even have the setting, or would give a warning.

In my view, if it works, then it works, regardless of what somebody says on a web site. The biggest risk seems to be that a program will run out of RAM and fail.

Mr Evil
Posts: 566
Joined: Fri Jan 20, 2006 10:12 am
Location: UK
Contact:

Post by Mr Evil » Tue Mar 07, 2006 7:56 am

NoNameFace wrote:Please, everyone, educate yourselves here:
http://episteme.arstechnica.com/eve/ubb ... 9002352731
That page is full of contradictions and flaming.

All I can say is that I have run without a swapfile and not seen any problems. It does seem to improve performance, although not in a way that any benchmark could easily measure. I have not seen any crashing from programs being unable to allocate enough memory (obviously you have to be sure you have more RAM than you will ever use).

What I have seen with a swapfile is programs running away allocating massive amounts of memory, causing huge amounts of data to be paged to disc, effectively locking up the machine for a long time until the program eventually crashes. If this were to happen on a machine with no swapfile, it would still crash but would do so quickly, without all the disc thrashing.

TomZ
Posts: 386
Joined: Tue Feb 07, 2006 2:59 pm

Post by TomZ » Tue Mar 07, 2006 8:04 am

Felger Carbon wrote:Anybody know of something like that what can be bought today?
Here is a review for a RAM drive from Gigabyte:
http://www.anandtech.com/storage/showdoc.aspx?i=2480

I don't have any experience with it, however.

inti
Posts: 118
Joined: Thu Feb 10, 2005 7:09 am
Location: here

Post by inti » Tue Mar 07, 2006 11:47 am

I have 2GB of RAM and two hard drives and I have tried this recently with many different combinations. Here is what I have found, in Windows XP Pro SP2:
(a) with no swap file set, Windows will create its own swap file of around 128MB on drive C: (very bad)
(b) with a swap file set on any drive less than about 40 MB, Windows seems to feel that is insufficient and so it creates its own swap file of around 128MB on drive C: (very bad)
(c) setting a small swap file of fixed size 64 MB on drive D: seems to be enough that Windows does not create its own. Windows also uses a swap file of that size very little, because it is so much smaller than the available physical RAM, so I have not noticed seek noises on drive D: - but I do not think it is possible to get drive D: to spin down.
(d) it is possible to set up a RAM drive which has a swap file on it if the RAM drive is already configured at boot time: this is because if you change the swap file settings they only become active if you reboot Windows.

The RAM drive software I have tried has mixed results:

Microsoft RAMDRIVE.sys (included in Windows) is limited to 32MB, although see this article to increase it to 64MB: http://www.tweakxp.com/article37313.aspx
I do not think it can have a swap file on it, but I have not tested extensively due to the low file size limit.

Ramdiskpro is a hack of the quasi-open source Microsoft Ramdrive.sys. I've not tested it yet, but if you are interested see here http://users.compaqnet.be/cn021945/RAMD ... iskpro.htm
There is a hack out there which can be set to drive B: which I find pleasing as that drive letter is otherwise totally unused. I cannot remember now if it is this hack or another one.

Ramdisk XP from Cenatek cannot easily be used for a swap file, because at boot time it gives you only an unformatted disk (it exactly simulates a physical drive and you have to partition it and format it in order to use it). I do not think that setting it to load an .ISO would help, but again I have not tested thoroughly. There are reportedly some workarounds discussed on the Cenatek forum (see section 3 of the user manual here) but you have to be a registered user to access the forum.

Ramdisk Plus 8 from Superspeed has system page file support (only in the 'Plus' version: see table of features on this page: http://www.superspeed.com/desktop/ramdisk.php). It is a premium product at $49.95 but the demo version that I have tried does work well: it loads the ramdrive correctly at boot time, and once you have set it up correctly it has the page file on it from Windows boot without any additional user configuration required. It took me a couple of goes to get this right (the FAQ here is helpful) and the technical support people were extremely helpful. Although it is a lot of money for one utility, this is so far as I can see the only product which actually does the job - and I think I can justify the expense on the basis it will extend the life of my D: drive by allowing it to be spun down. Recommended.

Edited comments about Ramdisk Plus 8: previously luke-warm comments but I think those were unfair, I am very positive now that I have got it working properly thanks to the product's technical support staff. (Edited a second and third time to add this explanation!)
Last edited by inti on Mon Mar 13, 2006 2:30 am, edited 3 times in total.

TomZ
Posts: 386
Joined: Tue Feb 07, 2006 2:59 pm

Post by TomZ » Tue Mar 07, 2006 2:29 pm

inti wrote:with no swap file set, Windows will create its own swap file of around 128MB on drive C: (very bad)
Are you sure it is doing this? My system is also WinXP Pro SP2, and it originally had a 2GB page file. After I changed the settings to none, it prompted me to reboot, which I did, and then I checked for the file in the root of C:\, and it had been deleted.

Xman
Posts: 18
Joined: Sun Jun 06, 2004 8:09 pm

Post by Xman » Tue Mar 07, 2006 5:23 pm

ideally we need fast flash memory drive with PCI interface like card with fast memory on the market 128-256 mb and on this drive place swap file in windows..


hmm bad results.. :roll:
http://www.anandtech.com/storage/showdo ... i=2480&p=6
Last edited by Xman on Tue Mar 07, 2006 5:52 pm, edited 1 time in total.

Xman
Posts: 18
Joined: Sun Jun 06, 2004 8:09 pm

Post by Xman » Tue Mar 07, 2006 5:31 pm

ops PCI33 and SATA have limitation 130-150 mb/s, we need PCI-E card :) for better transfers

Lilla
Posts: 134
Joined: Sun Oct 19, 2003 5:02 pm

Post by Lilla » Tue Mar 07, 2006 6:36 pm

The article below offers the best advise on this topic that I have found.
If you google you will find many references to it.

Virtual Memory in Windows XP
http://aumha.org/win5/a/xpvm.htm
Version 1.6 — Last Updated February 21, 2006
by Alex Nichol
(MS-MVP - Windows Storage Management/File Systems)

below is one quote from what is a much longer article...
Can the Virtual Memory be turned off on a really large machine?
Strictly speaking Virtual Memory is always in operation and cannot be “turned off.” What is meant by such wording is “set the system to use no page file space at all.”

Doing this would waste a lot of the RAM. The reason is that when programs ask for an allocation of Virtual memory space, they may ask for a great deal more than they ever actually bring into use — the total may easily run to hundreds of megabytes. These addresses have to be assigned to somewhere by the system. If there is a page file available, the system can assign them to it — if there is not, they have to be assigned to RAM, locking it out from any actual use.

TomZ
Posts: 386
Joined: Tue Feb 07, 2006 2:59 pm

Post by TomZ » Tue Mar 07, 2006 6:45 pm

Doing this would waste a lot of the RAM
Sounds fishy to me. Why would an application allocate a large amount of memory and not use it?!? What would be the purpose of that?

Devonavar
SPCR Reviewer
Posts: 1850
Joined: Sun Sep 21, 2003 11:23 am
Location: Vancouver, BC, Canada

Post by Devonavar » Tue Mar 07, 2006 7:08 pm

Scratch space (i.e. Photoshop, video editing).

Or, to allow the program to do its own memory management.

Memory allocation is a very expensive operation. Therefore, programs that are potentially memory intensive often allocate memory in large blocks to avoid the cost of bogging down performance with many allocations for small amounts of memory.

Writer
Posts: 31
Joined: Tue Jul 06, 2004 8:53 pm

Post by Writer » Wed Mar 08, 2006 12:15 am

Google for Mark Russinovich's take on this. (Sorry I'm too tired/lazy to dig up the link.)

TomZ: no disrespect intended, but I wouldn't discount that thread at ArsTechnica; if it's the one I'm thinking of then IIRC it included posts by someone who is exceedingly intimate with XP paging at the kernel level.

To answer your question:
Why would an application allocate a large amount of memory and not use it?!? What would be the purpose of that?
Every process on an NT/XP system has 2 GB of virtual address space to use. (This can be increased to 3 GB using a rarely used setting, but for most purposes that's inadvisable.)

Note that it doesn't matter how much physical memory you have on a system - even if you could somehow install 20 GB of RAM, in 32 bit XP each process could still only use 2 GB of virtual addresses.

Memory allocation schemes often require a contiguous block of address space - and although physical memory cannot become fragmented in any meaningful way, the virtual address space can become fragmented. In fact this can limit the amount of virtual address space that is usable to a process, since it reduces the largest contiguous block that is available.

Applications that need a large contiguous pool of memory, or that know they will need one later, often reserve a large block of address space as early in the life of their process as they can, in order to guarantee access to those contiguous addresses. They can then commit those address into physical or paged memory later.

(Note that it's always up to the OS to decide how much of the committed memory is in physical and how much is on disk. There's an often misunderstood API call that a lot of programmers think gives them the ability to control this, but it doesn't really do what they think it does.)

My personal recommendation for performance is to have multiple drives, turn off the swap file on the C: drive, and set up multiple fixed and/or OS managed swap files on every other lesser used drive. This prevents swap file access from interrupting seeks on your system drive.

(XP actually stripes swap file accesses if you set them up on multiple drives.)

sonuvbob
Posts: 78
Joined: Mon May 30, 2005 12:17 pm

Post by sonuvbob » Sun Mar 12, 2006 10:43 am

NoNameFace wrote:
sonuvbob wrote:Disabling the swap file's an option too, if you have enough RAM. Some things might not run without a swap file though (Quake2's the only one I remember outright refusing to run).
No, no, no.

Please, everyone, educate yourselves here:
http://episteme.arstechnica.com/eve/ubb ... 9002352731
Interesting stuff, but how much of that applies to Win98SE?

TomZ
Posts: 386
Joined: Tue Feb 07, 2006 2:59 pm

Post by TomZ » Sun Mar 12, 2006 6:06 pm

So far, I'm running a week with no virtual memory (swap file) and everything is running perfectly.

I typically run 10-20 apps at a time, and use the computer 80+ hours a week, so I think I'm giving it a good workout. I don't run any "wierd" apps like Photoshop, however, that have bizarre memory allocation schemes.

Writer
Posts: 31
Joined: Tue Jul 06, 2004 8:53 pm

Post by Writer » Mon Mar 13, 2006 12:31 am

TomZ wrote:So far, I'm running a week with no virtual memory (swap file) and everything is running perfectly.
You still don't understand. :) All you're doing is removing one form of paging.

Apps that request more virtual address space than you have physical will still get it, and memory will still be paged to the hard drive.

Read DriverGuru's posts in the ArsTechnica thread.

Or read the wiki entry.

inti
Posts: 118
Joined: Thu Feb 10, 2005 7:09 am
Location: here

Post by inti » Mon Mar 13, 2006 2:58 am

Please note that I edited my earlier post to set out much more positive comments on Ramdisk Plus 8, now that I have got it working correctly.

---
Writer wrote:(XP actually stripes swap file accesses if you set them up on multiple drives.)
That is an interesting fact. But unfortunately striping, and more generally any kind of RAID system, is very bad for a low-noise PC because it means all relevant drives have to be spinning constantly, and even worse, whenever there is a seek then all drive heads move simultaneously so you have greatly increased seek noise and vibration.

I recommend 2GB of physical RAM and the ramdisk approach. In more detail I am now using:
* a 256MB ramdisk
* 128MB of pagefile on that ramdisk to keep Windows happy; no pagefile on any other drive
* Temporary Internet Files on the ramdisk (yes I use IE6)
* A few other temporary folders on the ramdisk which replace the relevant Temp folders on the C: drive using the Mountvol command.
This makes for a very smooth running system, and some web-based operations are noticeably faster. I don't have any application that needs more than the 1.8GB of RAM that is available (although if an application did need more than that then it would fail or crash, as with no pagefile on any actual hard drive there is no possibility of increasing the virtual memory).

TomZ
Posts: 386
Joined: Tue Feb 07, 2006 2:59 pm

Post by TomZ » Mon Mar 13, 2006 5:26 am

Writer wrote:You still don't understand. All you're doing is removing one form of paging.
Sorry, I should have been more precise. Let me try again: So far I am running a week without a paging file and everything is working great. I realize that virtual memory is built into the OS and is not possible to disable.

In the referenced thread, there is heaps of misinformation (e.g., defragging your PF helps performance - MS says this is a myth) and lots of controversy and disagreement. Referenced articles to reputable web sites like WindowsITPro don't really consider the case of "lots" of memory, e.g., 2GB+. They talk about Photoshop that allocases a few hundred megs - who cares - that is just a small fraction of available RAM. If you read through the user comments, you also hear anecdotes of folks disabling paging files with perceived performance improvements and no loss of functionality or stability.

Actual experience trumps theory and the pondering of "informed" posters on message boards. Everyone feels more intelligent/informed than they really are, so there is a tendency to overstate "facts." My system is running fine without a paging file, and that disproves nay-sayers. If I get a system crash, BSOD, or application that refuses to run, I'll post here about it.

It is my opinion that advice to not disable the paging file was relevant with 64MB, 128MB, 256MB systems, and therefore is a holdover from older times. I think that the designers of WinXP anticipated this by allowing page files to be disabled in the first place.

andyb
Patron of SPCR
Posts: 3307
Joined: Wed Dec 15, 2004 12:00 pm
Location: Essex, England

Post by andyb » Mon Mar 13, 2006 6:10 am

Having tried a couple of RAM-disk programs I concluded that under windows XP its worthless.

Extra RAM + NO Pagefile works fine for me, I have been running my system with 2GB of RAM and NO Pagefile for 12 months, without a hitch or any trace of a problem.

I originally thought that RAM-disk programs would be a superb answer, but a bit of clear latteral thinking destroys any possible reason for wanting to use a RAM-disk.

Let me explain, the original idea of "Virtual Memory" (now called a "Page File") is due to the fact that in the past RAM was very verey expensive, and most people couldnt afford more RAM, but M$ came up with a compromise.

Virtual Memory, by moving apps, utilities, drivers etc etc that have loaded into memory onto a HDD freed up memory so the programs that were being used at the time would run faster due to having more memory available.

With the advent of XP and dirt cheap RAM there is no use for (most users) to have a Page File at all so long as they have 2GB of RAM, unless they have an annoying application that refuses to run without a Page File.

Now I have got the Page File on a HDD issue out of the way, let me explain why a Page File on a RAM-disk is pointless.

As mentioned above, Page Files are there purely to add more RAM (albeit very slow HDD RAM) to a system to increase the performance of the system.

The question is how does having RAM emulating a HDD running in RAM actually benifit the user.

It does NOT. The process of software emulation has a noticable performance hit on the CPU and your system has lost valuable RAM to a Page File which may not be used a great deal.

I tested my system with 1GB and 2GB of RAM with a Page File on the HDD and on a RAM Drive, and also with NO Page File at all.

NO Page File won hands down on performance with 2GB of RAM, and of course had no Page File drive access (noise reduction), I honestly cant remember the performance difference with 1GB of RAM but I recall very little if any performance difference until I fired up Battlefield 2 (which will quite happily eat 1,400MB of RAM).

Read this for an in-depth explanation of what I have condensed above, its excelent reading for anyone who can keep up with the article. This is what I based my own testing on BTW, lots of thanks go to Adrian Wong.

http://www.rojakpot.com/showarticle.asp ... 143&pgno=0


Regards Andy

Writer
Posts: 31
Joined: Tue Jul 06, 2004 8:53 pm

Post by Writer » Mon Mar 13, 2006 4:45 pm

init: Whether a striped page file causing a hard drive to remain spinning is "bad" depends on whether you can hear your hard drives in the first place. :) I personally reject the idea of allowing my hard drives to spin up and down all the time since I'm more concerned with longevity than noise.

TomZ: As for the arstechnica thread, like I said read DriverGuru's posts. I didn't say "every post in that thread is correct" -- the contrary opinions in that thread should make that obvious.

For the record, I used to develop device drivers professionally, and I currently work as a software developer (including recent work on custom memory allocation routines). Although I've never developed a file system driver, I do have a pretty good understanding of the subject at hand.

Andy: Adrian's guide is helpful, but IIRC the origins of virtual memory in NT had less to do with memory being "expensive" and more to do with implementing a segregated memory model on PC hardware. Virtual memory is as necessary on the PC when you have more physical memory than address space as it is when you have less.

Edit: Ultimately, if it works for you, use it. It's your system after all, so do whatever you want with it, so long as it doesn't do anyone else any harm. :)

IsaacKuo
Posts: 1705
Joined: Fri Jan 23, 2004 7:50 am
Location: Baton Rouge, Louisiana

Post by IsaacKuo » Mon Mar 13, 2006 5:16 pm

Writer wrote:I personally reject the idea of allowing my hard drives to spin up and down all the time since I'm more concerned with longevity than noise.
Keeping drives constantly spinning is good for noise, also. A continuous sound tends to blend into the background, if it's soft enough to begin with. The sound of a drive spinning up or spinning down tends to be very noticeable.

NoNameFace
Posts: 25
Joined: Sat Jan 15, 2005 5:21 am
Location: The Netherlands

Post by NoNameFace » Wed Mar 15, 2006 1:35 pm

sonuvbob wrote:Interesting stuff, but how much of that applies to Win98SE?
None of it. Windows 9x's memory mangement is a completely different animal.
Writer wrote:TomZ: As for the arstechnica thread, like I said read DriverGuru's posts. I didn't say "every post in that thread is correct" -- the contrary opinions in that thread should make that obvious.
Exactly. DriverGuru knows. He is, like, the internet version of Chuck Norris.

sonuvbob
Posts: 78
Joined: Mon May 30, 2005 12:17 pm

Post by sonuvbob » Wed Mar 15, 2006 10:09 pm

NoNameFace wrote:
sonuvbob wrote:Interesting stuff, but how much of that applies to Win98SE?
None of it. Windows 9x's memory mangement is a completely different animal.
Yeah, that's what I was implying :P. Felger said he was using Win98SE.

And unfortunately:
DriverGuru wrote:Disclaimer: The following applies to NT/2K/XP/2K3; I know very little about how Win9x handles this stuff.
Even Chuck-er.. DriverGuru lacks the proper (obsolete) knowledge.

NoNameFace
Posts: 25
Joined: Sat Jan 15, 2005 5:21 am
Location: The Netherlands

Post by NoNameFace » Thu Mar 16, 2006 1:05 am

Ah, I see. Must have missed that. If you're still using Windows 98 (although I really can't imagine why) then I suppose it wouldn't really hurt, its memory management by default is terrible anyway. Can't really screw that up I suppose ;)

Post Reply