LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-25-2019, 03:13 PM   #1
anon033
Member
 
Registered: Mar 2019
Posts: 188

Rep: Reputation: 13
Partition Sizes for Advanced Install


Hello all, I have been going the installation of hardened and encrypted Alpine Linux. There is a question I have. I like to break everything up into logical volumes to keep things flexible, but one issue I always have is figuring out sizes. For example I usually give swap 4 GB, root 70 GB and home the rest, etc. My question is this, I am looking to do something like having everything I can on their own LV. What is a good way to size the partitions? For example swap being 4 GB (or even 512M) on modern hardware is good, even though we use to do x2 RAM. Is there a good gage fro root, var, share etc? Thanks!
 
Old 05-25-2019, 06:05 PM   #2
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
Quote:
Originally Posted by FOSSilized_Daemon View Post
For example swap being 4 GB (or even 512M) on modern hardware is good, even though we use to do x2 RAM.
The size of swap depends on the size of the programs you run on the computer. I would not bother setting up swap space as small as this.
Quote:
Is there a good gage fro root, var, share etc? Thanks!
Again, this depends on the needs of the applications. How large are the databases you will be using? Are you running a web site? Are you using the computer as a server for anything? Then you should have an idea of the space requirements.

If you don’t, use the default setup.

EDIT:

Quote:
I like to break everything up into logical volumes to keep things flexible.
I don’t see how fragmenting your filesystem into small pieces adds flexbility.

Last edited by berndbausch; 05-25-2019 at 06:08 PM.
 
Old 05-25-2019, 06:18 PM   #3
hydrurga
LQ Guru
 
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 21 MATE
Posts: 8,048
Blog Entries: 5

Rep: Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925
Quote:
Originally Posted by berndbausch View Post
I don’t see how fragmenting your filesystem into small pieces adds flexbility.
It adds more flexible ways for the system to run out of space.
 
1 members found this post helpful.
Old 05-25-2019, 07:29 PM   #4
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,321
Blog Entries: 28

Rep: Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141
Regarding /swap, a crucial bit of information is missing. How much RAM does this machine have?

I think 70GB for root is too high. I normally give root 25GB to 30GB, /swap the indicated amount based on my personal formula, and /home the rest. I seldom more that 60% usage or /.

My personal formula for /swap is this: If I have less than 8GB RAM, swap = RAM. If it's 8GB RAM or more, I give /swap 4GB. (I do not hibernate.)

Last edited by frankbell; 05-25-2019 at 07:32 PM.
 
Old 05-26-2019, 04:37 AM   #5
Shadow_7
Senior Member
 
Registered: Feb 2003
Distribution: debian
Posts: 4,137
Blog Entries: 1

Rep: Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874
Breaking up things only makes sense if each is it's own physical device. And sense in that it having it's own device does not negatively impact the performance of the others. Like swap, /tmp, /var/log/, /home/, and whatever applies depending on what the computer is doing. Where volumes would be taking multiple devices and making them one filesystem across a bunch of disks. Or across one disk, so you can add a bunch of disks later. If you're not doing anything fancy, you're fairly safe going with system defaults IMO. Having 2x RAM if you suspend or hibernate is a need I suppose. But things boot fast enough these days I just turn them off. When I last used actual swap and not swap files on low ram systems. It was to accommodate media types that were read-only and encrypted, like DVDs. So the unencrypted version could be extracted to swap (if only in theory, probably didn't work that way). Of course back when swap was necessary, it was on spinning rust and often placed near the center of the spinning rust. In that way the read heads were at worst 50% of the way away from getting to swap. A practice that doesn't make sense on most modern storage devices. And even if it did make sense, why not give it it's own device. Storage is cheap these days.
 
Old 05-26-2019, 02:27 PM   #6
jmgibson1981
Senior Member
 
Registered: Jun 2015
Location: Tucson, AZ USA
Distribution: Debian
Posts: 1,141

Rep: Reputation: 392Reputation: 392Reputation: 392Reputation: 392
Use a swapfile so you can increase it's size later on if necessary. I personally only run a 2gb swap. It's never been touched. No sense wasting more space than needed.
 
  


Reply



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
Resizing partition in VHD file - root partition first, swap second (*Advanced*) dpesios Linux - Virtualization and Cloud 2 05-18-2012 05:50 AM
Resizing partition in VHD file - root partition first, swap second (*Advanced*) dpesios Linux - Virtualization and Cloud 3 05-17-2012 11:53 AM
define different physical sizes on Multiple Monitors of different sizes MasterC Linux - Desktop 2 03-18-2008 04:24 PM
Better buying "advanced linux prog" or "unix advanced prog" Dominik Programming 3 12-31-2003 01:11 PM
slack9.1-install/partition sizes on 120 gb ? sant-göran Linux - Newbie 2 11-10-2003 11:12 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:14 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