Results 1 to 9 of 9

Thread: To swap or not to swap

  1. #1
    Very good friend of the forum Virchanza's Avatar
    Join Date
    Jan 2010
    Posts
    863

    Default To swap or not to swap

    When I first got my laptop a few years ago, it had 1 gigabyte of RAM, which was pretty cool at the time. I was using WinXP as my main operating system back them. One day, I opened up as many programs as I could, I opened up every part of MS Office, I opened up a few media players and set them all to play, I opened up my web browser and set a few YouTube videos playing. I had a ridiculous amount of programs running, and my RAM usage peaked somewhere between 700 and 800 megs.

    So then I thought, "what the hell do I need a swap for?", so I went into the settings and disabled it.

    Now that I use Linux as my main operating system, I don't have a swap partition, and everything works fine. Right now, I've got Xfce running, with Thunderbird, two terminals, and Firefox. Here's what I get when I type "free -m":

    Code:
                 total       used       free     shared    buffers     cached
    Mem:           999        558        441          0         43        214
    -/+ buffers/cache:        300        699
    Swap:            0          0          0
    As I'm sure everybody is aware, RAM is way way way way faster than a hard disk. Back when I was about 7 years old using DOS and Win 3.11, if I had a game that was playing sluggish (e.g. DOOM), then I would create a RAM drive and then copy the game to the RAM drive. I'd then run the game off the RAM drive and it'd run like lightning.

    So one of the reasons I don't want a swap file is that I'm afraid the computer will start saving memory to disk when it doesn't have to (because as I've already said, I opened up a ridiculous amount of programs in WinXP and the most I ever used was about 750 megs).

    Plus nowadays, I hear people have computers with 2 gigs and 4 gigs of RAM, so the whole idea of a "swap drive" should be left in the stone age.

    Anyway the reason I started this thread is because I'm just after reading a tutorial that was posted here that shows how to dual-boot Linux with another operating system, and the tutorial involved making a swap partition.

    Can anyone remember about 10 years ago or so, when people were using Windows 98, and the hard disk drive would thrash every time you go to do something... 9 times out of 10 that was he swap file being loaded... it was horrible.

    Swap files might have their use for dealing with old computers, computers with 128 megs of RAM, but really I think they have no place in modern PC's.
    Ask questions on the open forums, that way everybody benefits from the solution, and everybody can be corrected when they make mistakes. Don't send me private messages asking questions that should be asked on the open forums, I won't respond. I decline all "Friend Requests".

  2. #2
    Good friend of the forums
    Join Date
    Jun 2008
    Posts
    425

    Default

    As I'm sure everybody is aware, RAM is way way way way faster than a hard disk. Back when I was about 7 years old using DOS and Win 3.11, if I had a game that was playing sluggish (e.g. DOOM), then I would create a RAM drive and then copy the game to the RAM drive. I'd then run the game off the RAM drive and it'd run like lightning.

    So one of the reasons I don't want a swap file is that I'm afraid the computer will start saving memory to disk when it doesn't have to (because as I've already said, I opened up a ridiculous amount of programs in WinXP and the most I ever used was about 750 megs).

    Plus nowadays, I hear people have computers with 2 gigs and 4 gigs of RAM, so the whole idea of a "swap drive" should be left in the stone age.

    Anyway the reason I started this thread is because I'm just after reading a tutorial that was posted here that shows how to dual-boot Linux with another operating system, and the tutorial involved making a swap partition.

    Can anyone remember about 10 years ago or so, when people were using Windows 98, and the hard disk drive would thrash every time you go to do something... 9 times out of 10 that was he swap file being loaded... it was horrible.

    Swap files might have their use for dealing with old computers, computers with 128 megs of RAM, but really I think they have no place in modern PC's.
    The processors know days cover the amount of RAM abit, large CAD and 3d games would full up a 1gig quiet quickly. I like the fact that if you do do something that will use more RAM than what you've got, its alot quicker to read off the swap space than normal indexed hard drive.

    What do you think is going to happen with the direction CPU and RAM, motherboard archtics are heading(apart from stated above)?

  3. #3
    Member
    Join Date
    Aug 2007
    Posts
    468

    Default

    How about getting one of these for your swap file?

    ACard's ANS-9010 Serial ATA RAM disk

  4. #4
    Good friend of the forums
    Join Date
    Jun 2008
    Posts
    425

    Default

    How about getting one of these for your swap file?

    ACard's ANS-9010 Serial ATA RAM disk
    Isn't that RAM turned into HDD.
    Will the idea of swap space still work out for new tecnology, L1 cache(CPU) is like 20gig/s and RAM 3gig, if L1 cache became RAM, would RAM(SSD) become HDD?

  5. #5
    Junior Member
    Join Date
    Jul 2008
    Posts
    88

    Default

    May i ask you a very newbie Question
    take BackTrack as example , how can i open a very large WordList (you know how big are Word Lists !) without Swap !!!
    i am very new
    Impossible is impossible

  6. #6
    Very good friend of the forum hhmatt's Avatar
    Join Date
    Jan 2010
    Posts
    660

    Default

    Always swap! There might come a day where memory will be large enough that any operating system running multiple large programs and files the memory will not fill. Large files such as wordlists and even books in any format will consume a very large amount of memory. And it doesnt take a whole lot to fill a gig or two of ram. Without the swap space as a backup to RAM space your operating system will crash and most likely corrupt some files in the process.

    Even with todays RAM sizes programs and files are becoming larger and larger along with with the increasing HD and RAM sizes.

  7. #7
    Very good friend of the forum Virchanza's Avatar
    Join Date
    Jan 2010
    Posts
    863

    Default

    @compaq

    If you're doing some high-end stuff, like running CAD program to design the next NASA space shuttle, then yes you could probably do with a lot of RAM. But the argument I'm making, is that if you actually do that kind of stuff, then you should have a more powerful computer and should have more RAM. It's the poor man's solution to use hard disk as a substitute for RAM.

    @omarara

    If you want to view a very large text file, you should use a viewer program that's designed to view very large text files. Have you ever tried to use "notepad" in MSWindows to open a file that's a few megabytes... you can take the dog for a walk while it loads.
    And as for programs that deal with dictionary files, for example Aircrack, well they read a line at a time, they don't load the entire file into RAM all at once. (Which is good because I don't even have 33 gigabytes of hard disk space to spare right now).

    @hhmat81

    Again, if you're dealing with big files, you shouldn't be using a basic program that will load the entire thing into memory all at once. As regards RAM getting filled and resulting in corruption, well that's easy... the system should display a friendly warning when RAM usage reaches 90%, so then you can close some crap down and continue on with what you're doing.

    I'm not doubting that hard disk swap is useful, but there's a much better solution: Get more RAM. If I was a graphics designer for instance, and if my RAM was regularly getting filled and I had to use swap space, I wouldn't be satisfied, I'd get more RAM. My own laptop has only 1 gig of RAM... but I haven't bothered to go buy any more RAM because I've yet to see the 1 gig under stress. If the day comes that the 1 gig is being threatened, I'll get more RAM before I turn swap on.

    If you haven't got a lot of money to spare, then fair enough go with swap, but I think it's the poor man's solution. Also, I don't trust some operating systems when it comes to sensible usage of swap. For instance, under MSWindows XP, you'll see that it will use swap when only a small proportion of RAM is being used.
    Ask questions on the open forums, that way everybody benefits from the solution, and everybody can be corrected when they make mistakes. Don't send me private messages asking questions that should be asked on the open forums, I won't respond. I decline all "Friend Requests".

  8. #8
    Junior Member
    Join Date
    Jan 2010
    Posts
    34

    Default

    I am glad this topic was brought up.

    Swaps are way to slow for some people but if they weren't so slow then i would use one.

    When are we going to get disk drives that have faster seek and latency? The solid state drives are somewhat faster but not fast enough for the price!!

    I really think if its possible to program smarter, that is what should be done to attempt to recycle what resources are available instead of making us thrash and bogg

  9. #9
    Good friend of the forums
    Join Date
    Jun 2008
    Posts
    425

    Default

    If you're doing some high-end stuff, like running CAD program to design the next NASA space shuttle, then yes you could probably do with a lot of RAM. But the argument I'm making, is that if you actually do that kind of stuff, then you should have a more powerful computer and should have more RAM. It's the poor man's solution to use hard disk as a substitute for RAM.
    I agree with the point in the fact that adding more RAM to a computer at one piont want make it go any faster, but like processors when they increase in speed the OS and software fills the gap. Try running vista on a 12meg of RAM.
    The furture doesn't always follow the past, and software might reach a point that it doesn't use anymore RAM than before, but unless the designs of computers change I don't think the ways the software(in relation to hardware) will change much.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •