LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 12-25-2013, 07:55 PM   #1
74razor
Member
 
Registered: Dec 2012
Posts: 39

Rep: Reputation: Disabled
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.
 
Old 12-25-2013, 07:56 PM   #2
jefro
Moderator
 
Registered: Mar 2008
Posts: 22,290

Rep: Reputation: 3662Reputation: 3662Reputation: 3662Reputation: 3662Reputation: 3662Reputation: 3662Reputation: 3662Reputation: 3662Reputation: 3662Reputation: 3662Reputation: 3662
Do you really NEED those?

How much ram do you have? What are you running, 32 or 64 bit OS?
 
Old 12-25-2013, 08:10 PM   #3
hitest
Guru
 
Registered: Mar 2004
Location: Canada
Distribution: Slackware, Void, Debian, Ubuntu
Posts: 7,445

Rep: Reputation: 3883Reputation: 3883Reputation: 3883Reputation: 3883Reputation: 3883Reputation: 3883Reputation: 3883Reputation: 3883Reputation: 3883Reputation: 3883Reputation: 3883
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.
 
Old 12-25-2013, 08:15 PM   #4
74razor
Member
 
Registered: Dec 2012
Posts: 39

Original Poster
Rep: Reputation: Disabled
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.
 
Old 12-25-2013, 08:29 PM   #5
ericson007
Member
 
Registered: Sep 2004
Location: Japan
Distribution: RHEL9.4
Posts: 735

Rep: Reputation: 154Reputation: 154
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.
 
Old 12-25-2013, 08:32 PM   #6
jtsn
Member
 
Registered: Sep 2011
Posts: 925

Rep: Reputation: 483Reputation: 483Reputation: 483Reputation: 483Reputation: 483
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.

Last edited by jtsn; 12-25-2013 at 08:40 PM.
 
Old 12-25-2013, 08:39 PM   #7
74razor
Member
 
Registered: Dec 2012
Posts: 39

Original Poster
Rep: Reputation: Disabled
Ok, well that makes sense. I can work with that. However, what is the recommended swap size? Is there a formula?
 
Old 12-25-2013, 08:45 PM   #8
jtsn
Member
 
Registered: Sep 2011
Posts: 925

Rep: Reputation: 483Reputation: 483Reputation: 483Reputation: 483Reputation: 483
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.

Last edited by jtsn; 12-25-2013 at 08:46 PM.
 
Old 12-25-2013, 08:46 PM   #9
mlslk31
Member
 
Registered: Mar 2013
Location: Florida, USA
Distribution: Slackware, FreeBSD
Posts: 210

Rep: Reputation: 77
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
mkswap testfile
swapon testfile
As for the partitions, it's what you want to do with it. At work, I keep separate /tmp and /home partitions. At home, I keep an encrypted /home and separate /var. If you're new, you can start with just / and swap. The people who get deep into the separate /var idea tend to cite things like mail spools for university-sized mail servers. I don't have such a server, so I keep a separate /var, use /var/src for source code, just so there's no fragmentation issues when I install things to /usr.

Last edited by mlslk31; 12-25-2013 at 09:00 PM. Reason: forgot mkswap line
 
Old 12-25-2013, 08:56 PM   #10
273
LQ Addict
 
Registered: Dec 2011
Location: UK
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 7,680

Rep: Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373
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.
 
1 members found this post helpful.
Old 12-25-2013, 08:56 PM   #11
jtsn
Member
 
Registered: Sep 2011
Posts: 925

Rep: Reputation: 483Reputation: 483Reputation: 483Reputation: 483Reputation: 483
Quote:
Originally Posted by mlslk31 View Post
The people who get deep into the separate /var idea tend to cite things like mail spools for university-sized mail servers. I don't have such a server, so I keep a separate /var, use /var/src for source code, just so there's no fragmentation issues when I install things to /usr.
The separation of /var is mainly for performance reasons. Still makes sense on a SSD: You mount every partition with "discard" (for TRIM support) except /var, which gets fstrim(8) on a cron schedule. You can also mount /tmp as tmpfs to completely keep the writes away from the SSD.

Quote:
use /var/src for source code, just so there's no fragmentation issues when I install things to /usr.
Modern Linux filesystems (even ext2/ext4) don't have any issues with fragmentation.
 
Old 12-25-2013, 09:00 PM   #12
273
LQ Addict
 
Registered: Dec 2011
Location: UK
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 7,680

Rep: Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373
Quote:
Originally Posted by jtsn View Post
You can also mount /tmp as tmpfs to completely keep the writes away from the SSD.
But if you have swap then, surely, you are using disk for this? Besides, I thought that tmpfs was disk and RAM and you need to specify ramfs for RAM only? (I do use tmpfs myself in my fstab because I've never got ramfs to work)
 
Old 12-25-2013, 09:04 PM   #13
jtsn
Member
 
Registered: Sep 2011
Posts: 925

Rep: Reputation: 483Reputation: 483Reputation: 483Reputation: 483Reputation: 483
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.

Last edited by jtsn; 12-25-2013 at 09:08 PM.
 
Old 12-25-2013, 09:17 PM   #14
273
LQ Addict
 
Registered: Dec 2011
Location: UK
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 7,680

Rep: Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373
Thanks for the clarification, since I don't have swap I feel better using tmpfs.
 
Old 12-25-2013, 09:18 PM   #15
mlslk31
Member
 
Registered: Mar 2013
Location: Florida, USA
Distribution: Slackware, FreeBSD
Posts: 210

Rep: Reputation: 77
Quote:
Originally Posted by jtsn View Post
Modern Linux filesystems (even ext2/ext4) don't have any issues with fragmentation.
They're still there, just not as obvious as it is on Windows. After a while, though, a speed gain can still be had from doing a backup/zero/format/restore cycle. That "while" can be a year or more, though, if I manage major deletes responsibly. Some filesystems (XFS, ext4, and btrfs) have defragmentation tools, but some filesystems (JFS, NILFS2, F2FS, and some more) don't have defragmentation tools. It's something to think about when planning partitions.

Note that I don't have an SSD to my name, and I don't know how they deal with such issues.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Recommended Partition Sizes Zaileion Linux - Newbie 13 11-19-2013 07:55 PM
Recommended filesystems sizes ? Vilius Red Hat 5 05-15-2008 08:41 AM
Recommended filesystem sizes using LVM ? Vilius Linux - Software 3 05-15-2008 07:48 AM
Recommended Partition Sizes vmanivan Slackware - Installation 4 08-17-2005 05:53 AM
recommended partitions/sizes for manual part. redhat install. iLLuSionZ Linux - Newbie 15 11-15-2003 06:37 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 06:06 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration