Slashdot Mirror


Swap File Optimizations?

fastswap asks: "I've got a pretty standard computer with reasonably fast drives. I've got an old 2GB-but-fast drive, and a spare channel on the motherboard. Does it make sense to install the 2GB drive on its own controller and use it for a dedicated, fixed swap file? I figure if the computer's using the swap file, then in the current setup with the swap file on the primary controller, then it's contributing to hard drive thrash exactly when one doesn't want it to (i.e. when the machine needs the swap file). If it is better to have a dedicated swap file on its own controller, is the same true for other operating systems with similar approaches to virtual memory? Since drive space is so cheap now, should the swap file be fixed size anyway rather than letting Windows suddenly get the urge to resize the thing?"

177 comments

  1. I've always seen good by Phalnix · · Score: 1

    results when using fixed swap size. as far as a dedicated controller and drive for swap.... that i dont know.

  2. Erm by Anonymous Coward · · Score: 2, Funny

    Swap file? Modern operating systems use a page file. Get out of your Loonix mind set, hippie.

    1. Re:Erm by Anonymous Coward · · Score: 0

      Swap is to page is to ... ?

    2. Re:Erm by NanoGator · · Score: 1

      "GNU/Linux uses swap partitions, dumbfuck."

      Mod parent up!! (So we can laugh at him!)

      --
      "Derp de derp."
  3. swapping? by ArmorFiend · · Score: 3, Interesting

    Do people still swap? Seriously, I can't remember when I heard my prime dueller do the rumble, and its only got 512 megs of ram.

    1. Re:swapping? by Anonymous Coward · · Score: 1

      Surely you've used one of the Mozilla brood? Even with 2 Gigs of RAM, the beast is wont to swap.

    2. Re:swapping? by ArmorFiend · · Score: 1

      I do use Moz, and I don't notice any swapping. Maybe my HD is to quiet AND my gnome swap meter is broken?

    3. Re:swapping? by Hythlodaeus · · Score: 3, Informative

      As is often the case, games are making some of the greatest demands on hardware. Many current games fill 300 or more MB by themselves, and right now I'm sitting on 225 MB with Mozilla, Word, and mIRC open.

      --
      For great justice.
    4. Re:swapping? by Enrico+Pulatzo · · Score: 1

      I'd say that you don't do anything worthwhile with that computer, then...but hey, that's just me.

    5. Re:swapping? by BCoates · · Score: 1

      Even if you have enough ram to function without swap space, you should enable it and give it some room so that the OS can swap out as it sees fit to make room for a bigger disk cache.

    6. Re:swapping? by Anonymous Coward · · Score: 0
      Seriously, I can't remember when I heard my prime dueller do the rumble, and its only got 512 megs of ram.
      Well, then. I see you haven't tried this yet ;)
    7. Re:swapping? by M1FCJ · · Score: 1

      if you start working on Java development and if you have quite a lot of files to compile... Welcome to the world of blinking disk lights...

    8. Re:swapping? by ColaMan · · Score: 5, Funny

      Close Word and you'll probably gain 100MB :-)
      No, seriously.
      I don't know what the hell kinda easter egg's in Word - I know Excel had a flight sim , maybe Word's got a 5 minute video of BillG rolling naked in a pile of money and whores.

      --

      You are in a twisty maze of processor lines, all alike.
      There is a lot of hype here.
    9. Re:swapping? by batemanm · · Score: 1
      Up until 2 days ago my office PC was swapping loads, then again it was a PIII 800 with 256 meg of memory. It was leading to performance problems. My new P4 2.8Ghz with a gig of ram doesn't seem to have the same issues :-) Now I'm just trying to get top to report that it is 0% idle, used to happen a lot on the old machine.

      Yes this post was just an excuse to tell people that I have a new computer :-)

    10. Re:swapping? by Anonymous Coward · · Score: 1, Funny

      I don't know what the hell kinda easter egg's in Word - I know Excel had a flight sim , maybe Word's got a 5 minute video of BillG rolling naked in a pile of money and whores.
      Nah, that was me.

    11. Re:swapping? by Mr.+Piddle · · Score: 1


      Yes, swap is still important to many people, even those with 512MB of RAM or more. With a dozen xterms, Mozilla, OpenOffice, etc. open, starting something like a MCAD application makes swap very very useful (if the OS is efficient about it, that is). Using swap doesn't necessarily mean slow performance, if the OS does a one-time dump of unused pages to the disk allowing the one big app to take what it needs. Switching among several large apps, though, means a purchase order for more RAM is in order.

      --
      Vote in November. You won't regret it.
    12. Re:swapping? by jonadab · · Score: 2, Interesting

      > I can't remember when I heard my prime dueller do the rumble, and its only
      > got 512 megs of ram.

      I make it a point to have enough RAM that the system almost never has to use
      the swap space, but I consider it vital to have the swap space there as a
      safety net, because occasionally something uses a whole lot of RAM (e.g., I
      might write a quick-and-dirty use-once-and-throw-away Perl script to process
      some data, and it might store them in a Really Big Hash while doing so, or I
      might have to work with an image in Gimp that's intended to be printed at
      600dpi at 8x10 inches, and I might forget to turn down the length of the undo
      history and perform several memory-intensive operations on the image), and
      the Linux kernel has a tendency to react rather badly to running out of both
      memory and swap space. So, as cheap as drive space is, I like to have plenty
      of swap space available for such occasions. Usually, it's 0% used and 100%
      available, but I consider it an important safety net. I like to have several
      gigabytes of swap space, Just In Case.

      However, if you're using the swap space often enough that you want to optimize
      its speed by putting it on a separate controller, I recommend more RAM instead.

      --
      Cut that out, or I will ship you to Norilsk in a box.
    13. Re:swapping? by Anonymous Coward · · Score: 0

      I can tell when my Linux computer swaps. The whole process lasts a _very_ short time, so it's fine. My Win95 computer is another story. Let it get a few days of uptime piled onto it, and it seems like every application wants to swap some pages around. I had to reboot it the other day because AIM (3.0N) wouldn't form its window right. Linux doesn't have those problems. I had 17 Firebird-0.7 windows open the other day when I took a count. They had things like the entire FreeBSD ports list and a large portion of the Gentoo handbook spread about. I could leave those pages alone for days and it still had no problem swapping to them. I'd still have them open now if Firebird hadn't crashed.

    14. Re:swapping? by aminorex · · Score: 1

      The first big bloat egg I heard of was
      Bill's horse pic in win95. From which we
      can reliably conclude that he prefers horse
      to whores, although the statement is
      misleading in some ways.

      --
      -I like my women like I like my tea: green-
    15. Re:swapping? by Angry+Pixie · · Score: 1

      Add to games data mining and modelling software, plus the databases and the database software itself. Full resolution video capturing always roasts your system nicely too.

  4. Fixed size... by Motherfucking+Shit · · Score: 4, Interesting

    The general advice that I've picked up is that, at least in the *n?x world, you should create a swap partition which is double the size of the machine's physical RAM. For example, if you're sitting on 512MB of RAM, a 1GB swap partition is appropriate.

    You only mention Windows towards the end of your question so I can't tell whether or not you're looking for a Windows answer. I've always allowed Windows to resize its swap file, but within a small window. This machine (Win2K) has 640 megs of physical RAM, and the swap file is set at 1280 minimum, 1960 maximum; that gives Windows "double the real RAM," but not a license to take over the whole drive. Seems to work well for me.

    I've never tried putting the swap on its own channel or controller - or even on its own drive - under any OS. Like you, I'd be interested in hearing whether or not this is worth the trouble.

    --
    "BSD: Free as in speech. Linux: Free as in beer. Windows 10: Free as in herpes." --Man On Pink Corner in #52607549.
    1. Re:Fixed size... by zatz · · Score: 3, Informative

      I think the recommendation of "at least twice physical memory" makes sense only with a VM system which employs a one-to-one mapping between allocated pages and disk blocks. I do not believe either Linux or Windows works this way.

      --

      Java: the COBOL of the new millenium.
    2. Re:Fixed size... by Brandybuck · · Score: 2, Informative

      I've never tried putting the swap on its own channel or controller - or even on its own drive - under any OS. Like you, I'd be interested in hearing whether or not this is worth the trouble.

      I still do this, but with 1G of RAM, I never swap anymore. Back back when I had a 100MHz system and 32M RAM, putting the swap on another harddrive made a significant difference. That was with Linux. Since Windows uses a swap file instead of a raw partition, so it might not make much of a difference.

      --
      Don't blame me, I didn't vote for either of them!
    3. Re:Fixed size... by WSSA · · Score: 3, Informative

      Don't let Windows resize the swapfile - that's a surefire path to fragmentation, fragmentation = slowness.

    4. Re:Fixed size... by Motherfucking+Shit · · Score: 1

      Well, I can't disagree with that. However, I would imagine that the OP and anyone savvy enough to be similarly curious is probably the type who runs chkdsk /r and defragments fairly often. At least I do ;)

      --
      "BSD: Free as in speech. Linux: Free as in beer. Windows 10: Free as in herpes." --Man On Pink Corner in #52607549.
    5. Re:Fixed size... by larien · · Score: 1
      2*physical RAM is an old rule of thumb which falls over on large systems; we have one server with 16GB of RAM and we don't really want to allocate 32GB of swap space which should never be used as a rule.

      In most cases, servers should never swap; most systems these days only have swap as a space for crash dumps; both Solaris and Windows do this.

      Also, as others have said, leave Windows page files at a constant side to avoid fragmentation; this is one thing which the *nix world has definately got right.

    6. Re:Fixed size... by unixbob · · Score: 1

      That was valid in the old BSD days, but newer paging algorythms no longer need this.

      --
      The Romans didn't find algebra very challenging, because X was always 10
    7. Re:Fixed size... by FlyingOrca · · Score: 1

      Absolutely. Fixed size at twice the amount of RAM, on a separate disk if possible. It's worked for me since NT4 (through 2K, XP, and server 2003). It's the resizing that really thrashes your disk anyway. Cheers

      1

      --
      Corruptissima re publica plurimae leges.
    8. Re:Fixed size... by Just+Some+Guy · · Score: 2, Informative
      FreeBSD, on the other hand, explicitly recommends having at least twice as much swap as real memory. From tuning(7):
      The kernel's VM paging algorithms are tuned to perform best when there is at least 2x swap versus main memory. Configuring too little swap can lead to inefficiencies in the VM page scanning code as well as create issues later on if you add more memory to your machine.
      --
      Dewey, what part of this looks like authorities should be involved?
    9. Re:Fixed size... by Bingo+Foo · · Score: 1

      The last umpteen Linux installs I performed had this "twice physical RAM" suggestion for swap. Has the VM changed in the last year?

      And a real question: what do you do when you subsequently add more RAM?

      --
      taken! (by Davidleeroth) Thanks Bingo Foo!
    10. Re:Fixed size... by jonadab · · Score: 1

      > The general advice that I've picked up is that, at least in the *n?x world,
      > you should create a swap partition which is double the size of the machine's
      > physical RAM.

      I consider this advice flawed. If you don't have enough RAM, then you have all
      the more need for extra swap space. Given the way the Linux kernel handles the
      situation of running out of swap space, and given how much drive space doesn't
      cost these days, I recommend having enough swap space that you NEVER run out.

      As for Windows, let it resize the swap file to any size it wants. If it starts
      to get even a little bit close to filling up the drive, it'll warn you, which
      gives you the chance to find what's using too much RAM and close it.

      --
      Cut that out, or I will ship you to Norilsk in a box.
    11. Re:Fixed size... by Rick+the+Red · · Score: 1
      A lot of people here have repeated the old advice to make swap twice your RAM. OK, so in the days of 16Meg RAM that would mean 32Meg of swap, for a total of 48Meg. So why would a 64Meg machine need any swap?

      I'm not flaming or trolling, I'm serious. Even if running a GUI (which never happened in the days of 16Meg machines, and don't mention X Windows because I know for a fact the serious number cruning workstations didn't waste their precious RAM on X -- remember, we're talking "back in the day" here) even if running a GUI sucks up the RAM we could go an order of magnitude higher these days, to 640Meg. That oghta cover KDE or Gnome. So why should a modern computer need any swap space, let alone twice as large as today's typical RAM?

      --
      If all this should have a reason, we would be the last to know.
    12. Re:Fixed size... by Anonymous Coward · · Score: 0

      I turned swapping off in Windows 95 once, just after upgrading to 512MB of RAM (the max). Know what Windows did when it reached 512MB? It froze--literally. No mouse, no nothing. Said it, "hm, no more RAM to use. Fuck this shit, I quit."

      When it came time to set up swap on a Linux computer, I used the x86-computers-can-address-4GB-of-RAM principle.

    13. Re:Fixed size... by StenD · · Score: 1
      So why would a 64Meg machine need any swap?
      Because "Eight Megs And Constantly Swapping" became "Eighteen Megs And Constantly Swapping", then "Eighty Megs And Constantly Swapping".
      So why should a modern computer need any swap space, let alone twice as large as today's typical RAM?
      Because you run programs which allocate large ammounts of RAM (say, VMWare), but don't actually need to access it all constantly?
    14. Re:Fixed size... by jonadab · · Score: 1

      > Don't let Windows resize the swapfile - that's a surefire path to fragmentation

      This is an overrated concern. First off, Windows only makes the swapfile as
      big as it needs to be, and on a decently large drive there's plenty of room
      for it to be as big as it needs to be without fragmentation. Second, while
      it's true that fragmentation can lead to slowness, this is less of a concern
      with modern drives than it used to be and, in any case, no amount of
      fragmentation on any drive can create enough slowness to be worse than what
      happens if you run *out* of swap space. Third, even if the swapfile is
      fragmented, this only will create slowness on swaps that cross one of the
      boundaries, and in any normal setup that's going to be such a small portion
      of the swaps that the impact will be lost in the underflow, dwarfed by other
      factors.

      Having a swapfile that Windows has resized is in practice no worse than having
      several swapfiles (as is possible e.g. on Linux -- although in other ways not
      pertinent to this discussion Linux handles swap space better than Windows;
      the resizing in Windows, though, is actually a good thing).

      The exception is if your drive is mostly full; in that case, fragmentation
      will be more of a problem and fixing the size of your swapfile may help.
      But the real solution would be to get a larger or second drive. A more
      common scenerio in Windows is for the drive to be mostly empty, and in that
      case the swapfile-resizing solves more significant problems than it creates.

      --
      Cut that out, or I will ship you to Norilsk in a box.
    15. Re:Fixed size... by Mercenary_56 · · Score: 1
      I'm currently running a seperate drive for my swap partition/page file. I had an extra 8 gig scsi drive laying around so I threw it in to see how I liked it. I split the drive in half, one is my linux swap partition and the other NTFS (for my page file). I know it's a bit overkill, but why not?

      I can say from experience that it is much nicer if you are doing a lot at the same time (loading data from the hard drive + using the swap). Your drive doesn't have to jump around to load data from the drive and write to the swap.

      I do agree with many of the other posts that if you have more money than time, go with more ram. I'm not really sure if I would consider it worth the time. It would take a lot of swap read/write cycles to just equal the time it takes to put the drive in the computer (not including setup time).

      --
      /* Insert some overused slashdot quote here */
    16. Re:Fixed size... by MikeDawg · · Score: 1

      The only problem with this (which doesn't make much sense in my mind) and as a caveat, I would say for "modern OSs", why would you need to double the amount of swap for more RAM you put in the system? You'd think that you would need to use a decreasing amount of swap with the more memory you put in your system?

      The only thing I could possible figure out, is that if ALL your RAM dumps all of its memory to the swap at once; but again, what OS does this, I'm quite sure that Linux (modern) doesn't do this, are there any modern OSs that do this?

      --

      YOU'RE WINNER !
      Another lame blog

    17. Re:Fixed size... by Angry+Pixie · · Score: 1

      A technique we Windows users have suggested for years has been to set the minimum and maximum swapfile/pagefile size to the same value equal to twice the amount of real RAM you have. Back under Windows 3.11 we had to type in the settings in our Windows configs. This technique has stuck really only out of habit though. At one time the formula was 2.5 x RAM. You can probably go lower. On Linux I used a swap filesystem equal in size to my real RAM, and I had no problems.

      I've always found storing Swap/pagefile on a separate drive off my main drive has given me better performance especially when running data mining/modelling or video editing software. Video capturing to a drive that is sharing your Pagefile can be a real drag.

      Maybe using a separate channel will result in bandwidth increases for the writes and reads on the swap disk. Eh??? But if it did, considering the speeds we're dealing with today, would it even make a noticeable difference?

      For security, I like to put my pagefile on the dame physical drive I store other short-term data (emails, photos, etc - anything personal not put to disc right away). The reason is that I figure the pagefile contains a lot of data that might be personal. Is there any sense to this? I also have Windows set to delete the pagefile on shutdown so...

    18. Re:Fixed size... by AlecC · · Score: 1

      Why should one not swap out program and data structures that one is not using, and free up ram for high-turnover uses such as disk caching? Given that disk space is cheap and the page swapping system exists, you might as well make use of it. I agree that, if one were developing a new OS with todays hardware, it is arguable that you shouldn't bother with a swapping mechanism (though the inifinite ability of people to use up processor power makes me doubt this). But since we have the swapping mechanism, you can effectively buy $100 worth of extra ram for about $5 (the cost of the disk space). Sounds a good deal to me.

      --
      Consciousness is an illusion caused by an excess of self consciousness.
    19. Re:Fixed size... by Wolfrider · · Score: 1

      --You shouldn't follow such advice blindly, without monitoring how much swap actually gets USED... Otherwise that 1GB of disk is completely wasted.

      --Example: 900MHz AMD Duron, 512MB RAM
      swapon -s
      Filename Type Size Used Priority
      /dev/hda5 partition 257000 0 3
      /dev/hdb5 partition 514040 0 3

      free

      total used free shared buffers cached
      Mem: 516196 232612 283584 0 24876 85448
      -/+ buffers/cache: 122288 393908
      Swap: 771040 0 771040


      --Note that the swap "Used" count is Zero.

      --Granted, all I have running ATM is Opera, rxvt, Konsole, Sawfish and a few daemons. But even recompiling the kernel will only use <100MB of RAM (usually much less.)

      --Monitor how much swap you use on a daily basis with various tasks. I'll bet you can resize your swap partition down to == the RAM or even a bit less, if you're not worried about suspend-to-disk.

      --From personal experience, the more RAM you have - the less swap you need. If you have installed 256MB-512MB of RAM, unless you're *really* pushing the machine, you only "need" about 300MB of swap.

      --If you've got ~128MB of RAM (typical older Windoze machine), 300-400MB of swap should be fine even if you're running KDE, XMMS, and a kernel compile all at once.

      --1GB of swap actually being *used* is almost unheard of, even if you only have 64MB of RAM; the machine would be so slow as to be almost unusable, and eventually the hard drive would go up in flames from disk thrash. (I've seen it happen with XP. I think the client had only 128MB of RAM installed, and XP swap thrash forced us to reinstall and repartition the disk around the bad sectors.)

      --AFA putting the swap on its own drive - Make sure the drive can handle DMA. If you implement it and it works well enough that you don't notice the difference, go for it. :)

      stupidassfkgslashdotlamenessfilter-POS-Ireallyfk g- hateititssodamnstupid-fixtheidiotlamenessfilteryou lazy-ass-sysadmins

      --
      .
      == WolfriderV6 == I'm willing to admit that *I just might* be wrong... Are you??
    20. Re:Fixed size... by Wolfrider · · Score: 1

      --Ah yes, vmware does work better with large amounts of memory. But as far as swap goes, it's still something that should be monitored:

      Before vmware (Win98 session, with 164MB of Ram alloc:)

      free
      total used free shared buffers cached
      Mem: 516196 232612 283584 0 24876 85448
      -/+ buffers/cache: 122288 393908
      Swap: 771040 0 771040


      --Same machine, with vmware session running (no programs active in the VM yet, just OS)

      free
      total used free shared buffers cached
      Mem: 516196 400996 115200 0 30616 233340
      -/+ buffers/cache: 137040 379156
      Swap: 771040 0 771040


      --And now Opera running in the VM session, with 6 windows open:

      free
      total used free shared buffers cached
      Mem: 516196 460160 56036 0 32272 288116
      -/+ buffers/cache: 139772 376424
      Swap: 771040 0 771040

      --Note that the swap usage is *still* Zero.

      --As far as EMACS goes... Well, there's always "jstar". :-)

      --
      .
      == WolfriderV6 == I'm willing to admit that *I just might* be wrong... Are you??
    21. Re:Fixed size... by Rick+the+Red · · Score: 1

      But I'm not making use of it. It's my understanding (correct me if I'm wrong) that the Operating System is what makes use of it, when needed. So far I haven't seen it used (as reported by swapctl). Wolfrider reports similar findings (in thread above).

      --
      If all this should have a reason, we would be the last to know.
    22. Re:Fixed size... by StenD · · Score: 1

      Your workload appears to be somewhat less than that on my system.

      Before VMWare (but with Mozilla, Lotus Notes 6.5.1 with wine, Ethereal, and a Java application):
      total: used: free: shared: buffers: cached:
      Mem: 526278656 512335872 13942784 0 73400320 206700544
      Swap: 1076051968 78237696 997814272

      Note that my swap usage *starts* at approximately 74MB.

      VMWare started, no session loaded:
      total: used: free: shared: buffers: cached:
      Mem: 526278656 477638656 48640000 0 73273344 200990720
      Swap: 1076051968 89071616 986980352

      VMWare with Win2K session (128MB RAM) running (not logged in):
      total: used: free: shared: buffers: cached:
      Mem: 526278656 519200768 7077888 0 13549568 322199552
      Swap: 1076051968 115929088 960122880

      So, why don't I add more memory? I can't - this notebook (an IBM ThinkPad A21p) only accepts a pair of 256MB SODIMMS. Why don't I get a newer system? The CPU is plenty powerful for my needs, I can upgrade storage as needed with the expansion bay, and purchasing a newer notebook with an equivalent for the 15" 1600x1200 display would run more than I'm willing to spend just to have more RAM, so why should I buy a newer system?

    23. Re:Fixed size... by Wolfrider · · Score: 1

      --Ah yes, Lotus Notes and Wine - I bet if you check, (run "top" and then hit the M key) there's your memory hog. There's no need to buy a new system, however - that's not what I was saying.

      --But notice - even with all that running at once, you're still using much less than 256MB of swap. You could probably resize that 1GB down to half that, or even 300MB - and still have plenty of leeway. If you're using KDE, I'd consider switching to a more lightweight WM (I use Sawfish, but that's prolly too bare-bones for most people) and you'll save even more resources.

      --
      .
      == WolfriderV6 == I'm willing to admit that *I just might* be wrong... Are you??
  5. Dedicated by yosemite · · Score: 2, Informative

    It is better

  6. Windows? by Anonymous Coward · · Score: 0

    You had me interested until you mentioned that this was for Windows. Yuck.

    1. Re:Windows? by Anonymous Coward · · Score: 0

      Have you considered autoerotic asphyxiation?

    2. Re:Windows? by Anonymous Coward · · Score: 0

      No thanks, I'm living proof that even Lunix geeks can have girlfriends...

    3. Re:Windows? by Anonymous Coward · · Score: 0

      oh, so you're a gay lunix user's bitch?

  7. Yes, seperate drive and fixed size by viware · · Score: 5, Interesting

    My experience has always been to give windows a fixed page file, at twice the RAM size (ie. 512MB RAM so 1024MB page file). Further, a separate physical drive is the best scenario, or second best is a separate partition.

    It is important to note that WindowsXP will use the page file whether you've got plenty of RAM or not.

    1. Re:Yes, seperate drive and fixed size by Dibblah · · Score: 1

      "Second place a seperate partition"

      Eh? You like making the head traverse the platter to get to your swap partition... why? Don't do this - Please.

    2. Re:Yes, seperate drive and fixed size by jantheman · · Score: 1

      I've always (when a separate HD was not available) put the swap file in it's own partition - ideally in the phyical middle if you think it's going to be used alot - ever since I had a real bad experience with OS/2 swap mechanism smiting every sector of the partition it was in - right from sector 0 onwards.

      Ok, so I don't use it any more, & it's probably fixed now (yes - it really did do it), but stuff like that gets burnt into your psyche.

      --
      -- Mod me down. I am not a karma tart. ffs,gag
    3. Re:Yes, seperate drive and fixed size by kayen_telva · · Score: 1

      I've never understood the reasoning behind "I have more ram, so I make a bigger swap file".

      Seems counterintuitive. Does anyone know why this is ??

    4. Re:Yes, seperate drive and fixed size by Quarters · · Score: 4, Informative
      It is important to note that WindowsXP will use the page file whether you've got plenty of RAM or not.

      You can instruct XP (and probably 2K) to not page the executive and to use more memory as cache space. This reduces the amount of paging significantly.

      HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Contro l\Session Manager\Memory Management
      *Change DisablePagingExecutive to 1
      *Change LargeSystemCache to 1
      *Reboot

    5. Re:Yes, seperate drive and fixed size by Zeriel · · Score: 2, Informative

      Well, back in the good old days when 4MB was "more RAM", you generally only had a machine with relatively large amounts of RAM if you were processing a similarly large amount of data.

      Joe User would have a machine with 4MB RAM and 8MB swap for his word processing and Ultima 2 or whatever.

      Stan Scientific would have a machine with 32MB RAM and 64MB swap because he probably was going to eventually have to deal with datasets larger than 32MB (if you've done ANY scientific computing over historical datasets, you know what I mean).

      Basically, more RAM implies you should be swapping less, for a home system.
      But for a server or high-end processing computer, more RAM implies you need vast amounts of RAM in general, and swap doesn't hurt.

      --
      "America has done some terrible things. But I know that Americans don't cheer when innocents die." -Dave Barry
    6. Re:Yes, seperate drive and fixed size by JeFurry · · Score: 3, Informative

      You can instruct XP (and probably 2K) to not page the executive and to use more memory as cache space. This reduces the amount of paging significantly.
      HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Contro l\Session Manager\Memory Management
      *Change DisablePagingExecutive to 1
      *Change LargeSystemCache to 1
      *Reboot

      True, but doing this disables standby and hibernate modes, since the kernel can't be unloaded any more. If that's not a problem for you, go ahead of course, but it's worth being aware. I did this, and kept finding my system going into standby on request, but never resuming, and it took me ages to find out why...

      --
      -- What goes up must come down. Ask any SysAdmin.
    7. Re:Yes, seperate drive and fixed size by Anonymous Coward · · Score: 0

      Don't assume these settings will make your system faster in the general case. Otherwise, MS would have made them the defaults.

    8. Re:Yes, seperate drive and fixed size by perlchild · · Score: 1

      Psychology, you have a faster computer, that can do more tasks, and you can multitask, so you will run larger tasks that take more ram, and that swap WILL be used.

      The other reason is that you have some recurring processes(scheduled tasks, crons, disk defrags) that run at times when the machine is supposed to be idle, but may just be busy. With larger swap, you avoid a crash, by risking more swapin/swapouts.

    9. Re:Yes, seperate drive and fixed size by Anonymous Coward · · Score: 0
      True, but Microsoft recommends those registry changes if you do have a lot of memory. The Resource kit says:
      Setting this value to 1 is useful when debugging drivers, because all of the code and data is always memory resident. It also improves performance on machines with a lot of memory, because it prevents disk reads to get code or data.
      Check these two links for reference: DisablePagingExecutive and LargeSystemCache.
  8. Separate swap under linux. by derrith · · Score: 4, Informative

    I've done this under linux, say get a 2-6GB drive and use it as dedicated swap. I tend to do this with scsi servers when I'm patching together old gear. Say an 18GB root drive and then the smaller drive as dedicated swap. leaves everything open. And if the swap drive does get thrashed, no big deal. It's quite effective and works well in my experience.

    --
    why does the porridge bird lay his eggs in the air?
    1. Re:Separate swap under linux. by Anonymous Coward · · Score: 0

      Compared to any sort of modern drive, those old 2GB drives are veerrrry slooooww. If you are doing any serious swapping, this plan is going to kill your performance.

  9. Dedicated is better; linux lets you RAID it by Anonymous Coward · · Score: 2, Informative

    Dedicated is better.

    However, you will never get true swap performance using Windows.

    To do that you need a real operating system. Linux will let you put one swap partition on each controller, set them to the same priority, and it will automatically spread the access between them, getting a RAID-like speedup in your swap access times.

    Also, remember to put swap partitions (if you are using files you are hopelessly fucked) on the end of the disk, so that they will be on the outer sectors where the transfer rate is fastest.

    1. Re:Dedicated is better; linux lets you RAID it by Anonymous Coward · · Score: 0
      How did "swap" and "performance" wind up in the same sentence and not be antonyms?

      Where I'm from, if you are hitting your swap file with any kind of frequency, it's time to take a hard look at adding RAM.

    2. Re:Dedicated is better; linux lets you RAID it by Anonymous Coward · · Score: 0

      Windows supports spreading swap over devices since at least Win2K. Linux is great, but grow up, yeah?

    3. Re:Dedicated is better; linux lets you RAID it by spiff42 · · Score: 1
      Also, remember to put swap partitions (if you are using files you are hopelessly fucked) on the end of the disk, so that they will be on the outer sectors where the transfer rate is fastest.

      I have always thought that the sectors were numbered from the outside inwards. I remember this from some comments regarding dual-boot, and how having Windows on the first partition and Linux on the 2nd would make the Windows system a little faster and the Linux system slower (compared to Linux on the 1st partition and Windows on the 2nd).

      Does anyone have any hard facts on this question. ie. will it be better to have the partition you want most performance from at the beginning or the end of the disk? Are there any filesystems that use the space from the other end (as in higher sector numbers)?

      In regards to setting the priority on the swap partitions, this works very well. When I setup software RAID systems with linux, I always have a partition on each disk for swap. Depending on the needed stability I will let the swap-system handle the striping (with priority), or mirror the swap (if we need to be able to survive a disk crash without rebooting).

      Coming back to the original post, I am wondering if Windows supports swapping to a partition? Wouldn't there always be some overhead in swapping to a file (eg. having a filesystem layer in between)?

      /Spiff

    4. Re:Dedicated is better; linux lets you RAID it by Prowl · · Score: 1

      but putting them in the middle of the disk will on average reduce the seek time.

      --
      That man tried to kill mah Daddy
    5. Re:Dedicated is better; linux lets you RAID it by MarcQuadra · · Score: 1

      only if your files are spread evenly throughout the entire disk. I know most of MY disks are only using 2-3 GB of the 40-80 available.

      The exception is the 'storage' drive on the server, and that's only holding files, not serving as a swapper or system volume.

      I've had the best luck in 2.6 with using a swapfile instead of a partition, and making the swapfile with 'dd' and 'mkswap' after the base system is installed and before I lay down all the other stuff. That places the swapfile close to the most-used application files and towards the outer end of the disk. I use a 512MB swapfile on all of my machines, most have 512-1024MB RAM and since I've been doing things this way I've only ever used about 3MB of swap (linux pages out unused stuff after a while).

      2.6 has a system whereby it can use a swapfile just as efficiently as a separate partition (it bypasses the filesystem layer to access it?).

      --
      "Sometimes, I think Trent just needs a cup of hot chocolate and a blankie." -Tori Amos on Nine Inch Nails
    6. Re:Dedicated is better; linux lets you RAID it by Micro$will · · Score: 1

      That places the swapfile close to the most-used application files and towards the outer end of the disk.

      How do you know? One of the features of ext2/3 is the way it avoids fragmentation by randomly placing files all over the partition, unlike FAT16/32 which fills the partition from start to end.

      The only way to optimize the location of swap space in Linux is to use a dedicated swap drive, or place the swap partition between /boot and /.

    7. Re:Dedicated is better; linux lets you RAID it by ivan256 · · Score: 1

      Does anyone have any hard facts on this question. ie. will it be better to have the partition you want most performance from at the beginning or the end of the disk?

      It depends on the disk manufacturer. It's fairly easy to tell though. Modern disks have track zones, with a different number of sectors per track in each zone. The length of a track increases towards the outside of the disk, so the zone with the most sectors per track is the outside of the disk. On scsi disks you can get the zone data with the scsiinfo utility under linux.

    8. Re:Dedicated is better; linux lets you RAID it by drsmithy · · Score: 1
      To do that you need a real operating system. Linux will let you put one swap partition on each controller, set them to the same priority, and it will automatically spread the access between them, getting a RAID-like speedup in your swap access times.

      So will Windows (NT, 2k, XP).

      Also, remember to put swap partitions (if you are using files you are hopelessly fucked) on the end of the disk, so that they will be on the outer sectors where the transfer rate is fastest.

      Putting them in the middle of the disk to minimise seek time would be a better plan - swapping generally entails lots of small, random reads and writes, not long, continuous reads and writes. Not that physical location makes a whole lot of difference these days.

  10. Linux Swap Space Mini-HOWTO by sICE · · Score: 3, Informative

    This Linux Mini-HOWTO might be of interrested to some /.ers, it describes how to share your Linux swap partition with Windows.

    1. Re:Linux Swap Space Mini-HOWTO by Anonymous Coward · · Score: 1, Informative

      Caution advised if you want to do this and use Software Suspend on Linux. (i.e make sure it's not your swsusp swap space that's going to get overwritten if you suspend Linux and boot into Windows).

  11. Good Results by harryk · · Score: 3, Interesting

    I too am in a similar environment as yourself. I took it one step further, and also setup the temp variables to use the same drive.

    I've noticed significant performance increases since doing, not to mention that I've freed up some space on other, more important drives.

    Good luck!

    --
    think before you write, it'll save me moderator points.
  12. Swap: Don't boot XP without it by WarPresident · · Score: 3, Interesting

    An old, surplus, dedicated swap drive on its own channel: $0.00

    A RAMdrive from system memory: Under $100

    A solid state disk drive you shove into a PCI slot with a bunch of SDRAM on it: Priceless

    For everything else, there's, Hey! Why would I pay more than a grand for a PCI bandwidth capped solid state drive when I can fill my memory slots and use RAMDrive at DDR bandwidth?

    --
    Here come da fudge!
    1. Re:Swap: Don't boot XP without it by Hast · · Score: 1

      Even Windows has a built in RAM disk, although you have to define it in the boot files. So changing the size requires a reboot unfortunately.

    2. Re:Swap: Don't boot XP without it by WarPresident · · Score: 1

      Even Windows has a built in RAM disk, although you have to define it in the boot files. So changing the size requires a reboot unfortunately.

      You mean the DOS driver ramdrive.sys? That isn't installed by default (does it exist anymore?) in XP. If I remember correctly, wasn't there a 256MB limit anyway? Perhaps not an issue if you've got 3GB of real RAM...

      --
      Here come da fudge!
    3. Re:Swap: Don't boot XP without it by Anonymous Coward · · Score: 0

      Yep, it still exists.

    4. Re:Swap: Don't boot XP without it by NanoGator · · Score: 1

      "A solid state disk drive you shove into a PCI slot with a bunch of SDRAM on it: Priceless"

      I went into sticker shock when I saw the 1-gig RocketDrive PCI card was $1,000. But then I got to thinking about it: It would cost me $500 to go from 1 gig of RAM to 2. (I have to throw out the old RAM...) Assuming it behaves better than my hard drive (well it should.. I mean it won't be as fast as the main memory but it should kick the drive's butt...) I could set the swap drive to it and get much better performance while I'm rendering. Then, if I get a new machine where I max out the RAM, I can slap the card in and still have an extra gig.... Yeah, I see what you mean by 'priceless'.

      Sorry to babble. I'm sitting here waiting for my computer to render. It's swapping about 500 megs in. Ugh.

      --
      "Derp de derp."
    5. Re:Swap: Don't boot XP without it by Marillion · · Score: 1

      Also note that it has a built-in controller. The key benefit is that it's not limited to the slowness of the channel connector - IDE/SCSI/Fibre - whatever.

      --
      This is a boring sig
    6. Re:Swap: Don't boot XP without it by Anonymous Coward · · Score: 0

      If you're going to spend significant cash wouldn't you get better performance doubling your RAM and combining that with the suggestion of moving the swap off to a secondary HD? I would bet you do far better with 2x ram than 1x ram + swap on ramdisk.

    7. Re:Swap: Don't boot XP without it by Lord+Kano · · Score: 1

      Why in the FUCK would you use RAM for Swap? If you have the memory, use the memory.

      LK

      --
      "Hi. This is my friend, Jack Shit, and you don't know him." - Lord Kano
    8. Re:Swap: Don't boot XP without it by Joe+U · · Score: 1

      There's also some systems that have artifical memory caps. A RAM drive/swapfile would be nice when your main system can't go over 384 or 512mb.

      (Thanks Intel, love that 815 chipset, and you wonder why I'm switching to AMD...ok, granted, that was 2 systems ago, but I hold grudges)

  13. no sense in that by zatz · · Score: 3, Insightful

    First, if this is a workstation for one person, not an application server, then you are not likely to feel performance is acceptable when paging does happen, regardless of the device where swap resides. Just because your OS installer insists that you allocate swap space doesn't mean you should use it often.

    Second, transfer rates have increased about ten-fold since that drive was manufactured. (Access times haven't.) While it is ideal to have swap space on its own spindle and controller, it doesn't make much sense to optimize details like that but use such a slow disk.

    Just make a swap file on your system disk and forget about it. If the rest of the machine is new, it should have enough physical memory that swap is mostly irrelevant.

    --

    Java: the COBOL of the new millenium.
  14. Absolutely!!!! by OC_Wanderer · · Score: 3, Informative

    From Windows XP back to Windows 95, gurus have suggested a fixed size of 2 or 2.5 times the size of your RAM. I keep it at 3 times, because I have CRS disease and can't remember the exact size. Better safe than sorry, since I have the room.

    Swapping on a separate drive is faster than swapping on the same drive. I've tested that. I also put the "temp" directories on the separate drive, as well as the data directories for my applications. This includeds the mailbox for Outlook Express and the temporary internet files for Internet Explorer.

    There's a big bonus to setting up like this, besides performance. There's less to backup from C: drive!

    [Contrary to popular belief, not all nerds and geeks use OSS.]

    --
    -- There is no spoon. Only fork.
    1. Re:Absolutely!!!! by zatz · · Score: 1

      There's a big bonus to setting up like this, besides performance. There's less to backup from C: drive!

      This is an attempt at humor, right?

      --

      Java: the COBOL of the new millenium.
    2. Re:Absolutely!!!! by Anonymous Coward · · Score: 0

      [Contrary to popular belief, not all nerds and geeks use OSS.]

      Ah yes, I know your type well. "I don't program, its too much trouble to install/use linux, but I use _________. I MUST be an ubergeek/ubernerd." *cough* luser *cough*

    3. Re:Absolutely!!!! by slashdot_commentator · · Score: 1

      This is an attempt at humor, right?

      Depends. Do users skip pagefile.sys when backing up? If so, yes.

      --
      There is no America. There is no democracy. There is only IBM and AT&T and DuPont, Dow, General Electric, and Exxon
    4. Re:Absolutely!!!! by Mr.+Piddle · · Score: 1

      Swapping on a separate drive is faster than swapping on the same drive. I've tested that. I also put the "temp" directories on the separate drive, as well as the data directories for my applications.

      For Solaris 8 and 9, at least, /tmp is swap (and RAM, using virtual memory for storage). This makes doing file operations in /tmp very very fast, but the user always has to take into account the amount of virtual memory on the system.

      --
      Vote in November. You won't regret it.
    5. Re:Absolutely!!!! by Lord+Kano · · Score: 1

      From Windows XP back to Windows 95, gurus have suggested a fixed size of 2 or 2.5 times the size of your RAM.

      That advice goes back to the days of Win 3.1, probably even further back, and it's bullshit. Any "guru" who makes such a blanked suggestion is talking out of his ass. He read it once ten years ago and is just parroting it.

      The point of having so much RAM is so that you don't need as much virtual memory. I have 512 MB in my current machine, it would be idiocy to use 1.25 GB of my HD for swap that I don't need. If I was running bigger programs, or needed to run more programs at once, I'd buy more RAM.

      Currently I'm letting Windows handle the swap on its own, it has allocated 768 MB for my swap. The task manager shows that I'm currently using 167 MB of that swap file.

      I couldn't agree more with the benefits of swapping to a different drive, but as for the swap/page/virtual memory. Don't believe the hype.

      LK

      --
      "Hi. This is my friend, Jack Shit, and you don't know him." - Lord Kano
    6. Re:Absolutely!!!! by bkedelen · · Score: 1

      He is right, most of us use alsa.

    7. Re:Absolutely!!!! by OC_Wanderer · · Score: 1

      Notice I said "gurus". I personally do not know how much of my swap file is in use most of the time. I know it gets used a great deal when I'm compressing a DVD or when I'm doing database intensive work. I have a gig of RAM, but it gets used up in those specific applications. I would probably need 10 gigs of RAM to avoid swap file usage in those circumstances.

      --
      -- There is no spoon. Only fork.
  15. two drives and 1 controller, with striped swap. by Elivs · · Score: 2, Informative
    I have two ide drives and 512M ram. I have the first 512M on each drive as a swap with linux stripping the swap. (See "man 2 swapon", "man swapon", "man 5 fstab" and set the priorities of each partion to be the same) I did this on the assupmtion that the bottleneck is likely to be disks's read/write speed, not the controller.


    Like you I'm also not sure if it makes much difference but my system certainly seems to often be swap limited. I currently have KDE3, several gnome apps, a browsers with 4 windows (20+tabs), 2 virtual desktops, and I often use octave to process high resolution images. Changing from one app to another can cause the machine to swap for a few seconds if I've haven't used the first app in a few hours/days.


    Elivs


    Clearly if I used windows I wouldn't have these problems as I could never leave apps idle for days while doing another task.

    /me Ducks as an "MS wireless mouse" flies towards me...

    1. Re:two drives and 1 controller, with striped swap. by Glonoinha · · Score: 1

      Controller limitations on IDE drive subsystems mean one read/write process at a time - thus putting half your swapfile on one drive and half on the other really don't gain you anything on an IDE system.

      If you had one drive on one controller, the other drive on a different controller (or if you were using SCSI) and you will see gains.

      That said, if your system seems swap limited watch the memory utilization - if your system has 512M and it is using all 512M of it, add more RAM for better performance (disclaimer - I have no clue whether or not your OS will use more than 512M but if it does, go for it.)

      Good news in you are looking at going to Windows - starting with Windows 2003 they are 'seeing crazy uptime numbers now, like three months'.

      --
      Glonoinha the MebiByte Slayer
  16. The HD sounds like a good idea by PurpleFloyd · · Score: 5, Insightful
    As far as using the HD goes, it sounds like a good idea, albiet with some conditions:
    • If you're planning on spending any money on this, it would be better off going towards more RAM.
    • If the drive isn't as fast as your primary HD, it may not be as good a deal as you might think. Remember that the non-DMA access modes used by older IDE drives, can eat up your CPU and thus any performance gain. Of course, this isn't an issue with SCSI if that's what you're using.
    • If you use an app that has its own scratchpad requirements, you might want to put that on the drive rather than your Windows swapfile. Photoshop comes to mind immediately as an example of where this would be a good thing; it might also be good for dumping processed video onto (although if you're doing major video work, you should have a fast, preferably RAID-0, scratchspace, along with more reliable storage).
    As far as a fixed-size swapfile, it should help some in Windows; when you defrag, it will help to keep your swapfile coherent as much as possible. Of course, if the swapfile is the only thing on the drive, it won't matter too much. If you do go for a fixed size file, make sure to make it larger than you ever think you'll need - it sucks to run out of memory when you're doing a lengthy, complex operation. One rule of thumb (not as valid these days) is to set your swap to 2x your physical memory. Another, which I use, is to simply take the most memory you'll ever think you'll use and then add a 50% safety factor. Remember to resize this if you ever start working with really large stuff - high-res video, 3000 x 3000 pixel Photoshop images, etc.

    Finally, remember that idealy, you never want to hit swap at all. If you're experiencing problems with thrashing, you should probably either pare down your system (do you really need to run that IM program all the time? all those systray utilities you never use?) or simply bite the bullet and get more RAM. Even the fastest hard drive can't touch RAM for speed, and seeing your system hit the pagefile for routine tasks means it's time to put a new stick of RAM into the beast.

    --

    That's it. I'm no longer part of Team Sanity.
    1. Re:The HD sounds like a good idea by Anonymous Coward · · Score: 0

      I recently had the same question, so I decided to play arround and find out. The short answer is "yes, there can be some benefit". A couple of notes though.

      If the swap drive is too much slower than the main drive you can start to lose the advantage.

      FAT seemed to have an advantage over FAT32 and NTFS for performance (it's the lowest overhead filesystem).

      Even with recent UDMA drives, the IDE bus doesn't handle multiple IO requests as well as SCSI does, so put the drives on separate IDE channels if possible (if your using SCSI, it matters a lot less).

      Use a fixed size swap file.

      Watch the swap activity, if it's too high, get some more real RAM. Having a separate drive just for swap space makes it easy - just watch the drive LED.

    2. Re:The HD sounds like a good idea by enigmatichmachine · · Score: 1

      " Remember to resize this if you ever start working with really large stuff - high-res video, 3000 x 3000 pixel Photoshop images, etc."

      good god I am fu@#ed... I'm about to start working on 3000 x 3000 res video..... any sugeestions on what kinda system i should buy to do the editing?

      --
      -and occasionaly a giant moose.
  17. If security is a concern by Anonymous Coward · · Score: 1, Informative

    If security is a concern, set Windows to use a fixed swap size, i.e. the minumum and maximum values should be identical. Then, install Eraser (GPL), which offers the ability to wipe the swap file during the reboot process.

    1. Re:If security is a concern by EddWo · · Score: 1

      Windows can do that itself anyway.

      http://support.microsoft.com/support/kb/articles /q 182/0/86.asp

      Or you can do it with a GUI. Control Panel -> Administrative Tools -> Local Security Policy -> Local Policies -> Security Options -> Shutdown: Clear Virtual Memory Page File -> Enabled

      --
      "Taligent is still pure vapor. Maybe they'll be the last who jumps up on Openstep... "
  18. Worry about what causes thrashing... by briaydemir · · Score: 1

    Another thing to consider: why is your machine thrashing? If what you're working with can't fit in RAM, then that's likely your real problem, not how efficiently you implement a swap file/partition. Compared to RAM, hard drive access is glacially slow, regardless of how you set things up.

    Most operating systems today should be able to deal with swap files/partitions with reasonable performance, without you having to go to great lengths to optimize things. So probably the "default setup" (whatever that may be) will be fine, unless you really need that last ounce of performance.

  19. Not enough data. by Phexro · · Score: 1

    You don't specify how much RAM your system has, nor how much you actually use your swap space.

    If you really hit your swap hard, then I guess installing a dedicated swap drive would make sense. Of course, so would upgrading your RAM, which would have a much more positive impact on your system's performance, and without the additional heat, noise, and power consumption that adding another drive would.

    As another poster mentioned, the rule of thumb is to have twice as much swap as physical ram. Personally, I think that's outmoded, and I don't see the point in even having a swap partition equal in size to a system's physical ram. I have 512mb in my desktop box, and I rarely hit my swap. Right now, I'm running a slew of apps, and I've only hit 5mb of swap.

    In short, it may be an interesting exercise, but it's probably not worth it.

  20. Some tips on optimization by Anonymous Coward · · Score: 1, Funny

    Generally according to the "Microsoft" way of doing things, you always want to seperate your system partition and your swap file. Hence if your OS is installed on your C: drive (be it the RAID array or your ATA drive) you should put the swap file on the other drive (d: or what have you). But in your case , I would be more tempted to put a smaller swap file (say about 2-300 MB on the raid partition, whichever that is) and make sure it is limited. Try it out for a while and if your programs are claiming they are running out of memory, switch to a larger or non-limited swap file.

    I'm generally not attracted to men, but my God something about Hitler just drives me absolutely batty! That dramatic sweep of hair across his brow, like he just tossed his head and there it fell, a cascade of black like the velvet curtain of night. I want him to take me on the hood of a King Tiger, its 1400 horsepower engine revving as he violates the virginal secrets of my Eagle's Nest. I picture it like those glorious mass rallies the Nazis used to have. There he is lovingly pounding away at my second front while legions of goose-stepping Aryans march past and salute our union. Just as Hitler is about to empty his tiny ubermenschen into the expanse of my Liebe-raum a wing of Stukas will fly overhead, their sirens howling in synchronicity with the primal cries of pleasure from Der Fuehrer. My god, what a man!

    Basically what I'm saying is if your RAID partition does not host your operating system it is very recommendable to put a swap file there as there will be less activity from the OS and swap file conflicting with each other, resulting in faster performance and paging.

    BTW have you tried running with out a swap file?

    1. Re:Some tips on optimization by imag0 · · Score: 0, Offtopic

      First troll I've laughed out loud at in a very long time. Good job!

  21. Of *course* it's worth it! by Eneff · · Score: 1

    Because not only will you get to play with antiquated technology, (yeah... 2GB is antiquated now.) but you get not one but two slashdot articles out of it!

    Just remember, you have all your time to avoid the slashdot effect, so you better have mirrors, boy. There ain't no excuse!

  22. In a word. Yes. by Anonymous Coward · · Score: 0

    Duh. This is classic old school system architecture. Better yet - place your swap file on a separate striped array on your 2nd PCI bus. So there.

  23. Great troll. by Anonymous Coward · · Score: 0

    Man, that was a good troll. Short, but sweet.

  24. Yes. by skinfitz · · Score: 1

    Does it make sense to install the 2GB drive on its own controller and use it for a dedicated, fixed swap file?

    Yes.

  25. Some suggest that... by AndyElf · · Score: 0

    ... you need a separate swap partition for each drive you've got, not for the whole system. This maybe, however, a bit of BSDism -- that's the land I've been living in lately.

    Also, has "128Mb swap limit" been surpassed in Lunix-land? Will you really be able to use whole 2Gb as a single partition or you'd have to split it up, ugh, 16 ways?

    Lastly -- on my BSD boxes even with X and mozilla running swap usage would tend to be minimal, unless I am doing something really big on top of that (like running KDE with a bunch of apps together with a buildworld or a portupgrade -rRf x11/kde3)

    --

    --AP
    1. Re:Some suggest that... by richie2000 · · Score: 1
      Also, has "128Mb swap limit" been surpassed in Lunix-land?

      Yes.

      --
      Money for nothing, pix for free
    2. Re:Some suggest that... by 10Ghz · · Score: 0, Troll
      Also, has "128Mb swap limit" been surpassed in Lunix-land?


      Is it just me, or are the *BSD-guys generally speaking assholes who suffer from somekind of superiority-complex towards Linux-users?

      To answer your question: Yes it has been surpassed. in 1998! So you are only about 6 years behind the times!
      --
      Lesbian Nazi Hookers Abducted by UFOs and Forced Into Weight Loss Programs - -all next week on Town Talk.
    3. Re:Some suggest that... by GiMP · · Score: 1

      There is no need to have a separate swap partition per disk; however, some operating systems (Linux and FreeBSD) can do raid-like striping across the swap partitions for additional performance.

    4. Re:Some suggest that... by jonadab · · Score: 1

      > Also, has "128Mb swap limit" been surpassed in Lunix-land?

      What 128MB swap limit? I've got one swapfile that's twice that size by itself.

      --
      Cut that out, or I will ship you to Norilsk in a box.
    5. Re:Some suggest that... by perlchild · · Score: 1

      It "does" look like many of them memorized the features for Linux 1.3 and can't believe anything improved since, doesn't it?

      Kinda like SCO assuming IBM had to buy all them 2.4 goodness...

      Gotta remember they have vested interest in linux not being as good as it can be, makes them look good.

    6. Re:Some suggest that... by AndyElf · · Score: 1

      Granted, I *am* a bit rusty (some claim 6 years) on the subject of Linux swap treatment -- but I distinctly remember that while you *could* have more than 128Mb total swap space (and I am referring to 2.x series, this is I am 100% positive), each partition had to be no more than 128Mb (although you could have multiple partitions in 128Mb chunks) -- anything above 128 would simply not be used by the system.

      I've spent a few wonderful years in Linux-land between 1995 and c.a. 2000 -- but once you mature to *BSD, it becomes a bit difficult to go back... I still like Debian, however.

      --

      --AP
    7. Re:Some suggest that... by AndyElf · · Score: 1

      I think there are benefits of having it per-disc, and the claim is normally to ensure that swapping is done most efficiently -- dumping unneeded data onto a drive that is currently accessed.

      This may be a bit imaginary, since reading it back may require a switch to another drive or controller all together.

      --

      --AP
    8. Re:Some suggest that... by perlchild · · Score: 1

      2.4 does not have those limitations, and has been "production-quality" for some time now. Thanks for proving my point :)

      I like the concept of BSD myself, and I've done a pilot of it, but for my use, Debian is still superior, it takes all kinds.

  26. Multiple swap partitions on multiple drives by Kopretinka · · Score: 1

    Just my 2c: I used to own a machine with limited RAM but with two HDDs. I split swap on dedicated partitions on both drives with the same priority (in Linux, I don't know if Windows can do this) and when I needed to swap, the performance increase was huge.

    --
    Yesterday was the time to do it right. Are we having a REVOLUTION yet?
  27. One Word Answer: No by silverfuck · · Score: 5, Informative

    Okay, so this is too late for all but the most sad of slashdotters to read it, but here goes:

    If the drive is 2GB, then don't be so sure that it is fast - it may have been when it was bought, but that was 6 or so years ago at least. I would be very suprised indeed to see more than 4-5MB/s sustained read and 2-3 write; there have been a lot of advances in the last few years.

    My current setup (1GB physical RAM) has 2GB set aside for each of Win2k and Linux in seperate partitions right in the middle (this will speed up average access times as the heads will have the least far to travel on average from any random point over the platters) of the raid array (and hench middle of both disks, as it is RAID-0), which I know to be fast - benchmarking has pegged it at greater than 110MB/s sustained. Windows will hit the swapfile no matter what (just try setting the swap to 0, even on a well-heeled system, and watch it complain at bootup/logon), so it gets 512MB to play with just at bootup and can go all the way to the end of it's swap partition if it wants. Linux, well, that's another story (currently support for the raid array is patchy, so not running linux - the partitions are still there, though, waiting for filsystems!), but as everybody knows, linux is very aggressive about swapping stuff out and using physical RAM as a disk cache, so again I expect it to hit the swapfile after a few days (hours?) running, but be perfectly happy with 2GB.

    --
    You know you've been IMing too long when you almost say 'lol' out loud to a non-geeky friend...
  28. Windows Swap by turgid · · Score: 0

    The last time I set up Windows on my Pee Cee (1996 IIRC) it would swap stuff out to disk because of 64k segment limitations. I think it was when it had too many icons, or the colour depth was too great. You used to have to install the DOS disk cache program to try to cache the stuff in high memory that Windows insisted on swapping out to disk, even though the system maybe had 16 or 32 megabytes of RAM. I find it hard to believe they haven't fixed this yet. Maybe they have? Is that why the speed of your swap partition is so critical?

    1. Re:Windows Swap by Anonymous Coward · · Score: 0

      The WinNT memory manager likes to have "backing store" -- a page file mapped 1:1 with RAM. This isn't "swapping" per se however -- if you never run out of memory, you can make Page File == RAM and leave it at that.

      Anything you know about Win3.1 or whatever no longer applies.

    2. Re:Windows Swap by NerveGas · · Score: 1


      If you're talking about Windows 9x, then early and excessive swapping had another cause.

      The memory manager for Windows 9x tries to take the same philosophy as Unix - use all available memory for disk cache, and release it as necessary. The only problem was that it would not release it willingly enough.

      If you watch the memory, swap, and cache usage, you'd see that it would use so much for disk cache that swapping would occur early. Theoretically, that swapped out data could also be in the disk cache, but behavioral observation indicated that it probably wasn't.

      On every win9x machine I've seen, used, fixed, or tweaked, limitting the disk cache size to a more reasonable figure GREATLY improved the performance through reducing (or eliminating) swapping.

      Luckily, NT/2K/XP aren't quite as bad in that regard.

      steve

      --
      Oh, you're not stuck, you're just unable to let go of the onion rings.
  29. Performance considerations by jcasey · · Score: 2, Informative

    If thrashing is causing degradation, I would seriously consider increasing RAM before improving on the swap drive.

    Check the performance specs for that 2gig drive first. If you are connecting an older, slower drive, you may actually worsen performance. For best performance, use a drive that can supports whatever performance features your mobo offers ( UDMA-66, Serial ATA, etc... )

    IF using Windows 2000/XP you can spread your page file accross multiple hard drives.

    --
    X
  30. Putting swap in a RAM disk makes no sense by mlq · · Score: 4, Informative

    Putting swap in a RAM disk makes no sense what-so-ever.

    1. Re:Putting swap in a RAM disk makes no sense by Strange+Ranger · · Score: 2, Informative

      Parent is not informative. Provocative maybe. In order to be informative, the parent's statement needs a supporting explanation, including what OS.

      RAM disks are fast, Windows requires swap no matter your physical RAM size, so why not put it on a RAM disk?

      What are us dummies missing mlq? Please elaborate.

      --

      Operator, give me the number for 911!
    2. Re:Putting swap in a RAM disk makes no sense by Anonymous Coward · · Score: 0

      Because then you are wasting RAM that could be put to better use doing disk-caching or used in programs.

      There's really no benefit in trying to defeat Windows' backing store behavior. Sure your disk spins when the computer is idle, but it doesn't slow anything down.

    3. Re:Putting swap in a RAM disk makes no sense by Anonymous Coward · · Score: 0

      depends.. if you have a gig of ram then you could have plenty to spare. Especially if you're looking at other options, ram is cheap.

    4. Re:Putting swap in a RAM disk makes no sense by PurpleFloyd · · Score: 1
      Perhaps I should explain the concepts behind a swap file/partition first. The system "swaps out" data in memory that hasn't been used for a while to the hard drive, which, while much slower than memory, also tends to have much more space available. By doing this, it can then free up fast physical memory for tasks that need it. If it needs the data on the hard drive again, it will swap that back into physical memory, swapping it with data in physical memory that hasn't seen much use recently. Of course, this is an extremely simplistic explanation; the algorithms which determine just what gets swapped when are very complex. Still, it will do for the basic concepts.

      What, then does this have to do with putting the swap file in a RAM disk? Simple - a swap file is hard drive space masquerading as RAM, and a RAM drive is RAM masquerading as a hard drive. You end up going in a circle. The net performance gain in the best case would be zero, and in the real world will be negative due to overhead. You would be much better off simply specifiying to Windows to use no swap space at all; of course, this can be dangerous if you don't have more RAM than you'll ever use.

      --

      That's it. I'm no longer part of Team Sanity.
    5. Re:Putting swap in a RAM disk makes no sense by Lord+Kano · · Score: 1

      RAM disks are fast, Windows requires swap no matter your physical RAM size, so why not put it on a RAM disk?

      Because it's a waste. The more RAM you have, the less swap you need.

      --
      "Hi. This is my friend, Jack Shit, and you don't know him." - Lord Kano
    6. Re:Putting swap in a RAM disk makes no sense by Anonymous Coward · · Score: 0

      What about --> TONS of ram, plus still need some windows swap (ALWAYS need some). You folks keep saying it's better to leave the small *required* swap file off of a RAM disk. If you've got RAM to spare... why?

    7. Re:Putting swap in a RAM disk makes no sense by jonadab · · Score: 1

      > RAM disks are fast,

      Yeah, but not faster than RAM.

      > Windows requires swap no matter your physical RAM size,

      However, it only uses the swap space actively if you run out of RAM. If you
      get rid of your RAM disk swap space, you'll free up enough real RAM to cover
      all the situations in which Windows would have resorted to swap space -- a
      simpler configuration and at least as fast.

      The only reason the grandparent isn't informative is because everybody already
      knows that, and even if they didn't it isn't exactly rocket science to figure
      it out.

      --
      Cut that out, or I will ship you to Norilsk in a box.
    8. Re:Putting swap in a RAM disk makes no sense by Strange+Ranger · · Score: 1

      >You would be much better off simply specifiying to Windows to use no swap space at all.

      That's the whole crux of my original post. You ever try that? I already understand everything you're saying and it falls severely short of the truth on a windows box.

      No matter how much main memory your system boasts, Windows XP still creates and uses a page file for virtual memory... If you have a large amount of RAM (at least 1 GB), you might think that Windows XP would never need virtual memory, so that it would be okay to turn off the page file. This won't work, however, because Windows XP needs the page file anyway and some programs may crash if no virtual memory is present.

      How aggravating. Anyway, there are many people today who have windows with "more ram than they'll ever need". Since Windows is too stubborn to run w/o swap, I say throw it back into RAM where it belongs in the first place. Heck, isn't that part of why you bought the ram? 1 gig of 400MHz DDR and the only time I can get XP to use more than 650M or so is when gaming. Meanwhile that page file is still there, thrashing occasionally.

      --

      Operator, give me the number for 911!
    9. Re:Putting swap in a RAM disk makes no sense by Strange+Ranger · · Score: 1

      see my response to above poster.

      >it only uses the swap space actively if you run out of RAM.
      Should be true. Isn't though. Just watch the Perf Mon.

      [time passes...]

      Ok, I just spent an hour reading/googling up on this. Apparently the MS link I give above is highly disputed. XP has an option for no-page-file, but MS says it'll make one anyway. But people who have done this can only find the evidence in the Perf monitor. No file anywhere. The mess doesn't stop there.

      Apparently there is much hullabaloo about what actually happens with a W2K/XP page file. My newly acquired lack of understanding here leaves me ... clueless.

      Apparently that's not far from where I started.

      --

      Operator, give me the number for 911!
    10. Re:Putting swap in a RAM disk makes no sense by Bishop · · Score: 1

      Since Windows is too stubborn to run w/o swap, I say throw it back into RAM where it belongs in the first place.

      But it won't work properly. Windows will try to swap out the ramdisk onto itself. In the end all that will happen is that the swap file will be full of many copies of itself. Better to have a swapfile on disk that is rarely used. I would surprised if Windows will even let you set the swapfile to be on a ram disk.

    11. Re:Putting swap in a RAM disk makes no sense by jonadab · · Score: 1

      > > it only uses the swap space actively if you run out of RAM.
      > Should be true. Isn't though. Just watch the Perf Mon.

      How about listening for hard drive activity? Depending on your drive and
      your case and how much other noise you have in the area, some of us can
      actually *hear it* when the system swaps. Plus, of course, you can just
      tell, because an alt-tab operation can take an extra couple of seconds,
      which is quite noticeable.

      I'll also note that I didn't say Windows doesn't use the swapfile at all if
      you have enough RAM; I said it doesn't use it *actively* if you have enough
      RAM. Which is to say, it doesn't use it enough to have a user-noticeable
      impact on performance, so don't sweat it -- until your RAM gets all filled up,
      that is, and then it gets quite noticeable indeed.

      --
      Cut that out, or I will ship you to Norilsk in a box.
    12. Re:Putting swap in a RAM disk makes no sense by Anonymous Coward · · Score: 0

      You have to understand the way we do accounting at the Whitehouse. By encouraging the use of RAM through aggressive RAMDisk tax-breaks, we will create new RAM, thus increasing our total RAM capacity.

  31. Re:Best Optimisation by Anonymous Coward · · Score: 0
    The single best optimisation you can make on your system is to delete Windows and install a proper operating system that has been designed and implemented by competent software engineers.

    You're suggesting Dave Cutler isn't competent?

  32. Re:Best Optimisation by Anonymous Coward · · Score: 0

    No, but he's wearing the Lead Boots of Bill Gates. They've slowed him down a bit.

  33. Yes, definitely by BoogieChile · · Score: 2, Insightful

    I've always gone for the extra channels when I'm buying a motherboard. Windows and apps live on one drive, swap/temp files and data on the other.

    Real world experience - Rally Championship 2000 - swap file on the same drive as the game - loading times were long - 30 seconds or more. The indicator bar would move for a bit, stop for a bit, move for a bit, stop for a bit...

    Change the swap file to the other drive and the level loading time went away. 18 seconds.

    And the progress indicator keeps moving all the way with no pauses.

    Think of it as the difference between having to do everything one handed (read this bit off the drive, track all the way across the platter to the swap file, write that bit there, track all the way back across the platter for the nexct bit of reading, etc, etc, etc), and having two hands (read with the right, write with the left)

    1. Re:Yes, definitely by NerveGas · · Score: 1

      Real world experience - Rally Championship 2000 - swap file on the same drive as the game...

      The last time I had a game use swap was Warcraft III on a 256-meg machine, and saw slowdowns like the one you mentioned. Rather than put swap on another drive, I stuck another DIMM in the machine, and the problem was solved. : )

      steve

      --
      Oh, you're not stuck, you're just unable to let go of the onion rings.
  34. The flaw in your argument... by leonbrooks · · Score: 1

    ...is that MS Windows is not a modern operating system. It got a shot in the arm as a reincarnated MICA (VMS 5+) but Microsoft managed to hobble even that.

    Swap partitions are even faster, but MS Windows can't do those.

    --
    Got time? Spend some of it coding or testing
    1. Re:The flaw in your argument... by Anonymous Coward · · Score: 0

      Nah, the only reason that Linux Swap Partitions were faster than Swap Files was due to bugs that have been fixed. Now, there's apparently no perf issue with using swap files, but old habits die hard, and disk is now cheap enough that having a resizable file isn't worth it.

      Windows's "Page File" is really both a Page File (RAM backing store) AND a swap file (fake memory).

  35. What I've always heard.. by MImeKillEr · · Score: 1

    ..is to put the swap on a drive other than the OS (not just a different partition), and on a different channel. I've also heard to put the swap start/stop at the same size (so its not fighting the filesystem for space) and to have the size be 2.5 to 3 times the amount of physical RAM installed.

    If you're running Windows NT/2000/XP, make the partition in question NTFS too.

    I'm running XP Pro with 512MB of PC2100 and have my swap start/stop at 2GB (ok, 4x my RAM) on an NTFS partition. The little trashing I do have is because that partition also contains game files and downloads from bittorrent.

    I imagine if you're using a 2GB drive solely for swap and nothing else, you may not have any thrashing at all.

    How reliable is that 2GB drive though? I guess it doesn't really matter, cause if the drive fails, the OS should move the swapfile back to the default location.

    --
    Cruising the internet on my TI-99/4A @ a whopping 300 baud!
    1. Re:What I've always heard.. by NerveGas · · Score: 1

      If you're running Windows NT/2000/XP, make the partition in question NTFS too.

      Why? NTFS is slower than FAT, offsetting the gains you might have made by your other tweaks. If you're worried about someone being able to read what's on the partition easily, well, they still can if it's NTFS.

      How reliable is that 2GB drive though? I guess it doesn't really matter, cause if the drive fails, the OS should move the swapfile back to the default location.

      If the drive fails, you've just experienced roughly the same thing as if you'd pulled a stick of memory out of your computer while it was running.

      steve

      --
      Oh, you're not stuck, you're just unable to let go of the onion rings.
    2. Re:What I've always heard.. by MImeKillEr · · Score: 1

      Why? NTFS is slower than FAT, offsetting the gains you might have made by your other tweaks. If you're worried about someone being able to read what's on the partition easily, well, they still can if it's NTFS.

      Slower how? In accessing files? This is just for the pagefile. And NTFS is better as far as fragmentation goes - less fragmentation with NTFS than FAT or FAT32.

      --
      Cruising the internet on my TI-99/4A @ a whopping 300 baud!
  36. do nothing by phrasebook · · Score: 1

    I've got a pretty standard computer with reasonably fast drives.

    So you don't need to do anything. Leave it alone. You're not going to notice an ounce of difference. All you'll be getting is the extra noise and heat of another hard drive, which will be rarely, if ever, be getting accessed. No need to do it.

  37. may not boot if drive disconnected by Anonymous Coward · · Score: 0

    > If it is better to have a dedicated swap file on its own controller?

    I had this setup a few years ago on a machine with 128 MB of RAM. It was definitely faster.

    One tip: if the paging file is on a separate disk, Windows may not be able to boot if that drive is disconnected. The solution is to also keep a small paging file on the boot disk, just in case. I recommend testing it by disconnecting the second drive and seeing if it still boots.

  38. swap file page file potato potahto by Oshkoshjohn · · Score: 1

    I created a six-Gig partion on my second internal hard drive for this problem.

    --
    Goddamned kids! Get off my lawn!
  39. Solution: 4GB RAM :-) by AmiMoJo · · Score: 0

    Most versions of Windows support a maximum of 4GB address space, so if you have 4GB of RAM you can't also have a swap file! Zero paging is achived!

    I guess the same goes for most other systems out there. Add enough cheap RAM and you are away.

    --
    const int one = 65536; (Silvermoon, Texture.cs)
    SJW, n: "Someone I don't like, and by the way I'm a fuckwit" - AC
  40. The obvious solution by Anonymous Coward · · Score: 1, Informative

    Putting more ram in the machine instead of adding another power consuming hard drive will give you a much better performance boost.

  41. There's no pat answer... by pointbeing · · Score: 2, Insightful
    Apparently we're dealing with Windows, so I'll chime in ;-)

    Depends on your PC and what you do with it. Putting the swapfile on the outside edge of the fastest disk that does *not* have Windows on it is generally the best idea. If you're concerned about dissimilar PIO or UDMA transfer rates, if your IDE controller supports multiple media transfer rates (most IDE controllers built after about 1998 do) you don't have anything to worry about. There's no reason I can think of to have multiple pagefiles on a Windows machine unless it's a server or you're heavily into A/V.

    Re size of the paging file: A static swapfile is always going to perform better than a dynamic one - provided the static file is big enough. Here's whatcha do -

    Use Performance Monitor to measure swapfile use over a week or two. You'll be able to tell exactly how much paging file you need from that. Take a couple hundred MB onto that number just for grins and make it a static pagefile.

    Paging to disk is always slower than using real memory - but some applications (one of them being Internet Explorer) *require* a swapfile. My XP box is a dual processor 1GHz machine with 384mb of memory. It's usually just used for surfing the web and a bit of word processing, but I've never seen more than about 10% of its 768mb static pagefile in use.

    Hope this helps -

    --
    we see things not as as they are, but as we are.
    -- anais nin
  42. Memory by Anonymous Coward · · Score: 0

    I've seen several comments here that basically assert that people are running their computers with 512 MB or even 256 MB of RAM and not swapping.

    I don't know how they do it.

    I work for a newspaper. I have a Power Mac G5 on my desk with a gigabyte of RAM in it. I run Mail, Safari, iChat, InDesign, InCopy, Photoshop, Illustrator, Suitcase, Acrobat, and Distiller all the time, and my machine swaps constantly. (Okay, I guess keeping iTunes going in the background doesn't exactly help, but how can you work without music? That's like trying to work in the dark, or without a chair.)

    G5 RAM (DDR 400, in other words) is getting pretty cheap. I may plop down a couple hundred dollars of my own money to add another gig to my machine. God knows I could use it.

  43. If it's more of a worry than by UnrefinedLayman · · Score: 1

    ...the electricity that you'll spend over the years on having this extra hard drive that does essentially nothing, yet remains spinning at all times because it's always being accessed, then yeah, go for it.

    Otherwise, forget about it and realize that the cumulative extra two seconds you spend each day because your primary drives are so bogged down by accessing your swap partition are worth not only the money you save by not wasting electricity but also worth making the world that much nicer by not creating an energy drain.

    1. Re:If it's more of a worry than by angle_slam · · Score: 1
      He's installing a hard drive, not an air conditioner. How much electricity does a hard drive use? A WD Raptor uses less than 10 W peak (see here). To be generous, assume it uses 10 W at all times. That is approximately 87.6 kW*hr for an entire year. According to this page, the avg residential price for electricity is 8.62 cents per kilowatt-hr.

      He will use $7.55 of electricity for an entire year. I don't think that will break him.

    2. Re:If it's more of a worry than by UnrefinedLayman · · Score: 1

      You're starting to sound a bit like a trained monkey: "less than ten watts," "8 cents per kWh," "7 dollars per year." Utility companies aren't in it to do the public good, they are in it to make money. They don't care about any wasteful effects of electricity being used, they only care about making sure they're putting out the maximum load they can to make as much money as they can. While it seems like a tiny bit of money to you and to me, it can be a metric shitload of money to them when you get millions of people doing it.

      Don't people get it yet? It's about cumulative effects. It's harder to get someone to give you a hundred dollars than it is to get a hundred people to give you a dollar. Even the homeless can figure that out. Whether it's snowballing costs from electricity or snowballing energy waste by a hundred-thousand people blowing through 8.76 million kWh in a year, it's a cumulative effect that's 1) taking more money from the poor to give to the rich and 2) taking more energy than can be sustainably supplied.

      People complain about the planet and the system and all sorts of other things a lot but never do anything about it. The most common complaint is "it's too hard to do anything about it" followed by "what can one person do?" Give me a fucking break: it's the LITTLE things that matter, like not stuffing a 2 GB hard drive in your system (which has the worst energy to size ratio you can get for modern drives) that you don't need.

    3. Re:If it's more of a worry than by angle_slam · · Score: 1
      You're starting to sound a bit like a trained monkey:

      And you sound like a green idiot.

      If you want to reduce power consumption, you start with the big things--refrigerators, driers, air conditioners, stoves. You don't start with a 10 W hard drive.

    4. Re:If it's more of a worry than by UnrefinedLayman · · Score: 1

      If you want to reduce power consumption, you start with the big things--refrigerators, driers, air conditioners, stoves. You don't start with a 10 W hard drive.

      If you had bothered to read what I said, you would have noticed that I specifically pointed out that people aren't willing to do "big" things, like give up their refrigerators, washing machines and air conditioners.

      It's like I said, it's easier to get a dollar from a hundred people than a hundred dollars from one person. It's easier to get ten watts out of a hundred people than a thousand watts out of one person.

    5. Re:If it's more of a worry than by angle_slam · · Score: 1

      Actually you never said anything about people unwilling to do big things. And I'm not talking about giving up air conditioning. Moving your thermostat up one degree (or going to the library or mall instead of staying home on a hot day) will save you a lot more money than worrying about a 10 W drive.

  44. Acting by Anonymous Coward · · Score: 0
    Why should I care what an actor says about anything other than acting?
    In fact, acting is nothing more that being paid to express someone else's ideas. So why should I believe they're sincere in this particular instance, and not shills for someone else?
  45. Why must it use soo much swap by BhAaD · · Score: 0

    Im talking about Windows. Regardless of the amount of RAM you have on your system, it will still use your page file. Also, if you try disabling the pagefile and restart the OS, it will automatically create a page file on 'C:' or wherever you installed it. Linux barely touches my swap even with X running and 5 - 10 GUI progs open (512MB RAM). Windows however refuses to leave the damn page file alone Currently im running a total of 33 processes on WinXP (on all visual disabled) and its using 202MB of swap, and 300MB out of 512MB of RAM is still available....Ridiculous

  46. Pls Mod Parent Up! Re:no sense in that by Kevster · · Score: 1

    Why do so many people keep saying "twice the physical RAM?" Can anyone really provide technical justification for it? Sure, it's not like we're generally hurting to set up a 1 GB paging file on a 120 GB drive, but as far as I can tell it's futile.

    Having a paging file does not increase performance! How can it? It's there to let programs allocate more 'memory' than physically exists in the machine, but if you're doing that regularly performance will suck. Badly. The more of the paging file is used, the more time you spend waiting for data to be read from the disk (slow) instead of RAM (fast). This is not the stuff of good interactive response!

    If you must, create a huge paging file, run your favourite programs for a few days without restarting the machine, and see how much of the paging file was actually used. Then reduce your paging file to that size, plus a margin for error. That's enough.

    --
    I always equivocate. Well, almost always.
  47. Fast Access by Anti_Climax · · Score: 1

    While I'm sure many of the suggestions here will give you a good increase in speed, I feel I should also recommend RAID. I've found that putting your swap on a small RAID 0 (a few gigs) is a great way to increase your throughput.

    Two older drives shouldn't have too much difficulty utilizing the available bandwidth of your PCI bus, and even a cheap ATA66 RAID controller should work as 66 MB/sec is the limit for each channel.

    --
    Even people that believe in pre-destiny look both ways before crossing the street.
    1. Re:Fast Access by NerveGas · · Score: 1

      If you're using RAID 0 for your swap, then there's no reason to even use RAID. Simply create two swap partitions of equal priority, and the kernel will automatically split the load between them.

      (Now if you were using a redundant form of RAID, that's a different story. No operating system likes having the swap pulled out from under it, so keeping it alive through a disk failure is a good thing.)

      steve

      --
      Oh, you're not stuck, you're just unable to let go of the onion rings.
    2. Re:Fast Access by perlchild · · Score: 1

      be that as it may, the extra overhead of redundant writes might slow you down...
      Swap is a necessary evil, optimizing it is in everyone's interest.

    3. Re:Fast Access by drsmithy · · Score: 1
      While I'm sure many of the suggestions here will give you a good increase in speed, I feel I should also recommend RAID. I've found that putting your swap on a small RAID 0 (a few gigs) is a great way to increase your throughput.

      Remembering, of course, that RAID will actually make your random seek times *worse* (or, best/rarest case, no better), probably offsetting that increase in throughput.

  48. change the partition type, too. by millia · · Score: 1

    separate drives, esp. on a separate channel or controller, will always help.
    but if you're dealing with xp, you can also gain some speed by NOT using ntfs on that drive. instead, use fat32- your swap file is not a file that needs full ntfs (permission or security or compression or encryption) complexity.
    combine that with a fixed size, from the word go, and you can get very nice speed bumps.

    --
    stored on computers from birth to the grave
  49. extra hard drive for swap by albertfuller · · Score: 1

    Putting an old and usable hard disk back into service is a good thing. As has been said set paging file (swap) to twice RAM. However consider, repointing all temp folders (system, and your programs, especially web browsers) so that all transitory acitivity is on this hard disk as well. So if all you have is 2GB hard disk, maybe sway at 1.3 GB and 0.7 GB for temp folders is not a bad idea. To make you swap efficient it should be fixed. But more importantly you more effectively control fragmentation. Also. Have you maxed out you RAM - in so far as off-the-shelf boards have RAM capacity crippled to 2-3GB generally (it ain't no server board) and with RAM so cheap, IMHO every board should be at max RAM.

  50. Re:the reason for the 2xRAM rule by EsbenMoseHansen · · Score: 1

    The RAM is like a window into the data on the swap file. So, at some point, the area the RAM can see is so small that swapping will become excessive, and thus make the computer unworkable. The 2xRAM is mostly an experience based rule for the limit to when adding more swap space no longer helps things. Note that the rule is quite old, and may need updating (though I still use it: 512Mb RAM->1Gb swap partition.). It is also an old hardcoded requirement for early linux, I believe, though that is of mostly historical interest.

    --
    Religion is regarded by the common people as true, by the wise as false, and by rulers as useful.
  51. If you gotta by TheSHAD0W · · Score: 1

    If you've got to swap, then yes, a separate drive to use for swapping is the way to go. It will prevent thrashing between your swap partition and your main partition when working with large executables or large blocks of data. You'd still be better off, however, by blowing some cash to get 2 gigs of RAM and disable swapping entirely.

  52. Advocating the swapfile instead of swap partitions by MarcQuadra · · Score: 1

    to some extent, yes, but I've seen improved app launch times from 'defragging' my reiserfs '/' partition (tar the files, reformat, untar to same place). This leads me to believe that there is, in fact, a structured 'closest to the top' file placement scheme in reiserfs. in any case, having the swap as a file inside '/' as opposed to a partition far away on either side of it seems optimal in 2.6, given that you only have one drive to work with.

    Even with multiple drives, running swap and '/' on the fast one might be advantageous, my drive has an 8MB buffer, and most writes to swap are much smaller than that, while an old 2GB drive likely has only a 512K buffer. If there's 4MB that the kernel wants to page out it'll go at 'wire speed' to the bigger drive, while the older 'dedicated' drive might have to swallow it in chunks as it commits.

    The real question is why should we worry about swap optimization AT ALL. I've got a 320MB system and it's never used more than 15MB of swap, and the activity on the swap was absolutely minimal. My 'bigger' systems almost never page out. You're much better off just making a smallish swapfile inside your filesystem and not having to deal with any more partitions than you need, the small amount of sanity this affords you should greatly outweigh the 'half-second over three weeks' of difference it makes in performance.

    --
    "Sometimes, I think Trent just needs a cup of hot chocolate and a blankie." -Tori Amos on Nine Inch Nails
  53. re: Easter eggs by booch · · Score: 1

    You don't seem to have much of a clue. Modern programs do not load entirely into RAM. Instead, only the portions of the program that are actually needed are loaded into RAM. So if you aren't using the spell check feature, it won't cost you any RAM, just disk space. This is done primarily with DLLs / shared libraries, but the paging system of most modern OSes is lazy -- even for the base program, it only loads what is needed.

    So assuming there were something as large as a 100 MB Easter egg, it wouldn't take up much memory until you found it.

    --
    Software sucks. Open Source sucks less.
  54. Nerds know better by Anonymous Coward · · Score: 0

    [Contrary to popular belief, not all nerds and geeks use OSS.]

    I see nothing in your post to indicate "nerd" or "geek". The fact that you have so little RAM that you'd hit the swap file at all lowers your nerd factor quite a bit. Add this to that the fact that not only do you repeat old advice about swapfile:RAM ratios but you INCREASE it. Yow. Is that you, dad?!

  55. Where are the smelling salts? by chargen · · Score: 1

    I got to:

    "Start Windows. Go to the Control Panel, select "386 Enhanced". Select "Virtual Memory" and ..."

    and prompty began to feel woozy. If anyone sees me heading for the floor, please run to catch me!

    Seriously... this takes me back...

    -Pete

  56. Re: Easter eggs by ColaMan · · Score: 1

    I have plenty of clue and I'm fully aware of DLL's/shared libraries and all the jazz that modern OS's do. Please note, however, the whole "BillG naked, pile of money and whores" thing. That *was* an attempt at humour - and who lets the mere truth get in the way of a good joke these days, hey?

    --

    You are in a twisty maze of processor lines, all alike.
    There is a lot of hype here.
  57. Re: Easter eggs by Anonymous Coward · · Score: 0

    > This is done primarily with DLLs / shared libraries

    Yep

    C:\>tlist winword
    1052 WINWORD.EXE Document1 - Microsoft Word
    CWD: C:\
    CmdLine: "C:\PROGRA~1\MICROS~2\Office10\WINWORD.EXE"
    VirtualSize: 62032 KB PeakVirtualSize: 63120 KB
    WorkingSetSize: 7452 KB PeakWorkingSetSize: 7748 KB
    NumberOfThreads: 2
    1732 Win32StartAddr:0x300018f4 LastErr:0x00000000 State:Waiting
    1648 Win32StartAddr:0x780015dd LastErr:0x00000000 State:Waiting
    10.0.5815.0 shp 0x30000000 C:\PROGRA~1\MICROS~2\Office10\WINWORD.EXE
    5.1.2600.1217 shp 0x77F50000 C:\WINDOWS\System32\ntdll.dll
    5.1.2600.1106 shp 0x77E60000 C:\WINDOWS\system32\kernel32.dll
    5.1.2600.1106 shp 0x77DD0000 C:\WINDOWS\system32\ADVAPI32.DLL
    5.1.2600.1254 shp 0x78000000 C:\WINDOWS\system32\RPCRT4.dll
    5.1.2600.1106 shp 0x77C70000 C:\WINDOWS\system32\GDI32.DLL
    5.1.2600.1255 shp 0x77D40000 C:\WINDOWS\system32\USER32.dll
    5.1.2600.1263 shp 0x771B0000 C:\WINDOWS\system32\OLE32.DLL
    10.0.4219.0 shp 0x30B00000 C:\PROGRA~1\Common Files\Microsoft Shared\offic
    e10\mso.dll
    6.0.2800.1106 shp 0x5AD70000 C:\WINDOWS\System32\uxtheme.dll
    7.0.2600.1106 shp 0x77C10000 C:\WINDOWS\system32\msvcrt.dll
    6.0.2800.1233 shp 0x773D0000 C:\WINDOWS\system32\SHELL32.dll
    6.0.2800.1400 shp 0x70A70000 C:\WINDOWS\system32\SHLWAPI.dll
    6.0.2800.1106 shp 0x71950000 C:\WINDOWS\system32\comctl32.dll
    2001.12.4414.42 sh 0x76FD0000 C:\WINDOWS\System32\CLBCATQ.DLL
    3.50.5016.0 shp 0x77120000 C:\WINDOWS\system32\OLEAUT32.dll
    2001.12.4414.42 sh 0x77050000 C:\WINDOWS\System32\COMRes.dll
    5.1.2600.0 shp 0x77C00000 C:\WINDOWS\system32\VERSION.dll
    2.0.2600.1106 shp 0x76400000 C:\WINDOWS\System32\msi.dll
    5.40.11.2210 shp 0x48000000 C:\PROGRA~1\Common Files\Microsoft Shared\offic
    e10\riched20.dll
    5.1.2600.1106 shp 0x75E90000 C:\WINDOWS\System32\SXS.DLL
    5.1.2600.1106 shp 0x76F50000 C:\WINDOWS\System32\wtsapi32.dll
    5.1.2600.1106 shp 0x76360000 C:\WINDOWS\System32\WINSTA.dll
    5.1.2600.1106 shp 0x76670000 C:\WINDOWS\System32\SETUPAPI.dll
    5.1.2600.1106 shp 0x73000000 C:\WINDOWS\System32\winspool.drv