The Notebook Review forums were hosted by TechTarget, who shut down them down on January 31, 2022. This static read-only archive was pulled by NBR forum users between January 20 and January 31, 2022, in an effort to make sure that the valuable technical information that had been posted on the forums is preserved. For current discussions, many NBR forum users moved over to NotebookTalk.net after the shutdown.
Problems? See this thread at archive.org.

    Where to put swap?

    Discussion in 'Linux Compatibility and Software' started by zephyrus17, Oct 23, 2008.

  1. zephyrus17

    zephyrus17 Notebook Deity

    Reputations:
    646
    Messages:
    1,576
    Likes Received:
    0
    Trophy Points:
    55
    Well, in the Arch beginner's guide, it says to put Swap in between / and /home. Is there a special benefit to doing this?

    Also, how does the hd allocate the partitons? Is sda1 in the most centre of the disc and sda4 right at the edge?

    So, would putting the swap at the very outside of the disc be (theoratically) faster than closer to the centre?

    And, since we're at it, with dual booting, will placing an OS at the front of the partitons make it boot faster than if it was at the back?
     
  2. Ethyriel

    Ethyriel Notebook Deity

    Reputations:
    207
    Messages:
    1,531
    Likes Received:
    0
    Trophy Points:
    55
    Yeah, I'm pretty sure the first sectors are the inside tracks of the hard drive.

    The outer tracks have faster sequential transfer rates. The inner tracks have better latency. For a swap, the latency is almost certainly preferential, which is probably why they suggest putting the swap between / and /home. I'm honestly not sure why you wouln't make it the first partition at the beginning of the drive, but it may have something to do with past issues installing a boot loader to partition beyond a certain sector.

    Personally, I don't even use swap, and you probably don't need it for desktop use, having 2GB of RAM. Unless you use hibernate, of course, in which case it hardly matters where it's located. If that's the case, I'd set swappiness to 0, or something very low, so it's hardly used if ever.
     
  3. zephyrus17

    zephyrus17 Notebook Deity

    Reputations:
    646
    Messages:
    1,576
    Likes Received:
    0
    Trophy Points:
    55
    swappiness?

    I'm just trying to get the most I can out of my linux, because I only use XP for games (D2 won't full screen in wine) and ProE Wildfire(it won't install in wine).

    So should I still put swap between / and /home, or arrange it like swap, / then /home? I think I'll just do a minimal swap, since I hardly ever use it.
     
  4. Ethyriel

    Ethyriel Notebook Deity

    Reputations:
    207
    Messages:
    1,531
    Likes Received:
    0
    Trophy Points:
    55
    http://kerneltrap.org/node/3000

    Basically, it's a setting to allow you to minimize the use of your swap when you can't disable it all together. You can also use it to make the kernel utilize swap heavily, and I'm sure there are good uses for that, but not on the desktop.

    If you want to maximize your performance, I'm of the school of thought that RAM is cheap and fast, use it. Every time your swap gets hit you're making a massive performance compromise. But using Linux, and having 2GB of RAM, it's probably never going to get hit anyway, so it's just a waste of space. I disable it just to make sure. Unless you don't have enough RAM to store working data, you're just going to have to hit the hard disk if it's not read ahead, anyway.
     
  5. zephyrus17

    zephyrus17 Notebook Deity

    Reputations:
    646
    Messages:
    1,576
    Likes Received:
    0
    Trophy Points:
    55
    So should I still stick to 2Gb of swap or drop to the minimal, since I don't hibernate
     
  6. Ethyriel

    Ethyriel Notebook Deity

    Reputations:
    207
    Messages:
    1,531
    Likes Received:
    0
    Trophy Points:
    55
    Well, it's up to you, but I'd either disable it (I don't have one with 2GB, and a slower processor than yours) or make it 256MB with swappiness set to 10 or 15.