What are recommended sizes for partitions and swap during install?
Just curious, I plan on making a swap partition and /, /home, and /var on separate partitions. I've went through the wiki but I don't see much as far as recommended sizes. I have a 160 GB SSD.
Thank you for any input. |
Do you really NEED those?
How much ram do you have? What are you running, 32 or 64 bit OS? |
For Slack all you really need is swap and root. If you want to keep data between installations you could have a separate /home partition.
|
Those are the recommended partitions according to the Slackware wiki. I like doing best practice so I was going to move forward with those partitions. Yea, I probably could just use / and that is it I suppose.
I have 8GB RAM and it is a 64 bit processor. |
I also like to keep things seperate.
I usually split up root /var /var/log /webroot /home and /usr I give each ample space but have run out of space a few times. Lvm is great for that sort of thing. I leave aroung 100gigs free on lvm and then later i can just make a volume needing more space bigger with lvexpand. Not the perfect solution to provide consecutive disk areas but it works pretty nicely. Without having to destroy and recreate partitions. |
On traditional Unix, you separate /, /tmp, /var and /usr (with /opt symlinked to /usr/opt and /home to /usr/home). In this scenario, / and /tmp are of fixed size (few GB), /var is sized to what the specific system needs and /usr gets the rest.
On Linux you may be fine with just / and /home, with / "big enough" and /home for the remainder. At least /home should be separate so a user filling his $HOME can not kill the whole system. |
Ok, well that makes sense. I can work with that. However, what is the recommended swap size? Is there a formula?
|
Swap size should be between RAM size and 2x RAM size. It can be used by swap-backed temporary filesystems (like tmpfs for /tmp) and Suspend to Disk, so RAM size is a good minimum while more than 2x RAM size doesn't make sense on most installations.
Using tmpfs is recommended with SSDs. |
Traditional swap is 2.5 * RAM. That stated, if my older PCs get to 1 * RAM in swap, I'm probably in some trouble. I use 1.5 * RAM, and if I need more, I do something like this:
Code:
dd if=/dev/zero of=testfile bs=1024k count=1024 |
For swap I think it depends on what you want to use the machine for. If you're only doing "normal desktop things" then filling 8GB of RAM ought not to happen very often so you could almost do without swap. However, that does mean that should you run out of RAM you will start to see processes killed (as I understand it). You also need at least as much swap as RAM for hibernate to work as it saves the contents of RAM to the swap partition (or file) before powering down.
I asked about the size of the root partition for Slackware myself on here and was told 15GB is more than enough for a full install plus a decent number of additional applications. I see no reason to doubt that. |
Quote:
Quote:
|
Quote:
|
Tmpfs uses RAM and reverts back to swap, if RAM gets low (using swap as backing store). Ramfs isn't recommended, there is no size limit and writing to a ramfs can fill up the complete memory (swap can't be used) and crash the machine.
|
Thanks for the clarification, since I don't have swap I feel better using tmpfs.
|
Quote:
Note that I don't have an SSD to my name, and I don't know how they deal with such issues. |
All times are GMT -5. The time now is 10:14 PM. |