LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
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 11-02-2012, 11:59 AM   #16
guanx
Senior Member
 
Registered: Dec 2008
Posts: 1,176

Rep: Reputation: 233Reputation: 233Reputation: 233

Quote:
Originally Posted by TobiSGD View Post
...
You are right, allocating 175GB to the system and putting the rest to /home is the right way to do on a disk with 116GB space. Would you now like to elaborate why you think that would be reasonable on a desktop system?
I saw people showing their own partitioning schemes for the OP's reference. The OP is certainly smart enough to try the structure by scaling down the sizes.

BTW, Where does your 116 GB come from? If you copy/past the OP's word then it should be different. You see, we both make errors on numbers.
 
Old 11-02-2012, 12:06 PM   #17
qweasd
Member
 
Registered: May 2010
Posts: 621

Rep: Reputation: Disabled
As to the "correct" size of swap for hibernate, ArchWiki has this to say:
Quote:
Even if your swap partition is smaller than RAM, you still have a big chance in hibernating successfully. According to kernel documentation: "/sys/power/image_size controls the size of the image created by the suspend-to-disk mechanism [...] which is set to 2/5 of available RAM by default. [...] The suspend-to-disk mechanism will do its best to ensure the image size will not exceed that number." You may either decrease it due to a small swap partition or increase it in purpose of possible hibernation speed up.
The rest is @GazL.
Quote:
Originally Posted by GazL View Post
I have 4GB ram, This is what I do (more or less):
/ 16GB
/var 16GB *
/tmp (in ram on tmpfs)
/home as big as needed.
no-swap

* 16GB /var so that you have plenty of space available for /var/tmp (for things that won't fit on the in RAM /tmp)
Why tmp in RAM and no swap? Are you that worried about the data security?

I was mulling over this exact setup for my laptop, but then I decided it's too much trouble for very little benefit. If my laptop is stolen, it will almost certainly be wiped and fenced. And even if stolen for data, the cost of replacing the hardware will still be my chief inconvenience. So I went with this crazy setup (16 GiB RAM):
Code:
       GiB
/       40
/home  190
/tmp   185
swap    20
If I had your 16GB root, I'd be out of space already because I've installed some heavyweights like texlive and built a few kernels in /usr/src. The other thing I cannot bear is small /tmp, where I stash all media downloads, and where SlackBuilds (typically) build. It sucks I cannot secure the data properly without it being a major PITA. Self-encrypting drives are all close-sourced (can there be greater irony?), and setting up dm-crypt for root and swap, and still being able to securely hibernate is very much like pulling teeth.
 
Old 11-02-2012, 12:12 PM   #18
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
Quote:
Originally Posted by guanx View Post
BTW, Where does your 116 GB come from?
Post #7, the one directly above yours. Nonetheless it would be nice if you post why you decided to go for that scheme instead of just posting your scheme.
 
Old 11-02-2012, 12:13 PM   #19
GazL
LQ Veteran
 
Registered: May 2008
Posts: 6,897

Rep: Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019
Quote:
Originally Posted by basil_brush View Post
@GAZL ...How much RAM would you need/recommend before running /tmp in RAM?
It's very hard to answer this question without making generalisations. You really need to consider what your high water mark for usage of /tmp is and whether you can afford to spare that amount of ram. I tend to use /var/tmp a lot, so my /tmp usage is usually quite light.

On a 1GB ram machine I might try and get away with a smallish tmpfs limited to a max of 128 or at a stretch 256MB, but it's all very situational. tmpfs only uses as much ram as needed by the files in it at the time, the size you specify is just a maximum. IMO once you've got 2GB or more ram /tmp on tmpfs is a no-brainer.

Also, unlike ramfs, tmpfs is backed by swap space, so it can cope with a degree of over-commitment, but performance will suffer, which kind of defeats the purpose of having it in ram in the first place.
 
Old 11-02-2012, 12:15 PM   #20
guanx
Senior Member
 
Registered: Dec 2008
Posts: 1,176

Rep: Reputation: 233Reputation: 233Reputation: 233
Quote:
Originally Posted by GazL View Post
I think you're being a little over generous with the allocations.

I have 4GB ram, This is what I do (more or less):
/ 16GB
/var 16GB *
/tmp (in ram on tmpfs)
/home as big as needed.
no-swap

* 16GB /var so that you have plenty of space available for /var/tmp (for things that won't fit on the in RAM /tmp)

P.S.
I don't bother with a separate /usr any more. Ask yourself why you would want it to be separate, if you don't have a good answer, don't bother.
Is there any potential hazard to mount tmpfs on "/var/tmp"?
 
Old 11-02-2012, 12:18 PM   #21
qweasd
Member
 
Registered: May 2010
Posts: 621

Rep: Reputation: Disabled
/var/tmp is not intended to be cleaned at reboot, so making it tmpfs is probably not a good idea.
https://en.wikipedia.org/wiki/Filesy...archy_Standard
 
2 members found this post helpful.
Old 11-02-2012, 12:20 PM   #22
Sli
LQ Newbie
 
Registered: Nov 2012
Posts: 17

Original Poster
Rep: Reputation: Disabled
Taking a few steps back, is there any reason why the partition scheme I posted in post #3 would not work (based on TobySGD's suggestion)? I don't need an overly complicated system. Would this lead to any stability issues or would my system be slower because I don't compartmentalize it more?

Swap: 6 GB (to allow possibility for hibernate)
Root: 30 GB
Home: 80 GB

Thank you for your help.
 
Old 11-02-2012, 12:24 PM   #23
guanx
Senior Member
 
Registered: Dec 2008
Posts: 1,176

Rep: Reputation: 233Reputation: 233Reputation: 233
Quote:
Originally Posted by TobiSGD View Post
Post #7, the one directly above yours. Nonetheless it would be nice if you post why you decided to go for that scheme instead of just posting your scheme.
Ok. Then it's impossible for me to get the number right anyway, because the OP does not get it consistent him/herself.

I suggested this scheme

/: 50 GB
swap: 25 GB
/usr/src: 100 GB
/home: the rest

because here / is large enough to hold a reasonable system, and swap can be used when the tmpfs contents on "/tmp" and "/var/tmp" grow too large. The big "/usr/src" is more specific to my own usage. The OP can easily omit the "/usr/src" here and get "/" and "swap" comfortably fit into a smaller disk.

---------- Post added 11-03-12 at 01:25 AM ----------

Quote:
Originally Posted by qweasd View Post
/var/tmp is not intended to be cleaned at reboot, so making it tmpfs is probably not a good idea.
https://en.wikipedia.org/wiki/Filesy...archy_Standard
Thank you for the link. Very helpful.
 
Old 11-02-2012, 12:29 PM   #24
GazL
LQ Veteran
 
Registered: May 2008
Posts: 6,897

Rep: Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019
Quote:
Originally Posted by qweasd View Post

Why tmp in RAM and no swap? Are you that worried about the data security?

If I had your 16GB root, I'd be out of space already because I've installed some heavyweights like texlive and built a few kernels in /usr/src. The other thing I cannot bear is small /tmp, where I stash all media downloads, and where SlackBuilds (typically) build. It sucks I cannot secure the data properly without it being a major PITA. Self-encrypting drives are all close-sourced (can there be greater irony?), and setting up dm-crypt for root and swap, and still being able to securely hibernate is very much like pulling teeth.
No swap simply because I've never needed it on my workstation. My current memory footprint sans buffers and cache is only 246MB out of 4GB and I never hibernate.
I run an lvm based setup though, so if I do ever hit a OOM situation its pretty easy to add an lvswap. Obviously, I wouldn't risk this on a server.
The same goes for my 16GB root (though currently it's only 40% used). If I were to add something huge like texlive, I'd probably create a lvtexlive and mount it on /opt/texlive or something similar.


Just goes to show, with partitioning schemes there are no right answers. What suits one person would be completely unworkable for someone else.
 
Old 11-02-2012, 12:31 PM   #25
GazL
LQ Veteran
 
Registered: May 2008
Posts: 6,897

Rep: Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019
Quote:
Originally Posted by Sli View Post
Taking a few steps back, is there any reason why the partition scheme I posted in post #3 would not work (based on TobySGD's suggestion)? I don't need an overly complicated system. Would this lead to any stability issues or would my system be slower because I don't compartmentalize it more?

Swap: 6 GB (to allow possibility for hibernate)
Root: 30 GB
Home: 80 GB

Thank you for your help.
That looks like a reasonable starting point if you're happy with those figures.
 
Old 11-02-2012, 01:12 PM   #26
jtsn
Member
 
Registered: Sep 2011
Posts: 922

Rep: Reputation: 480Reputation: 480Reputation: 480Reputation: 480Reputation: 480
Quote:
Originally Posted by TobiSGD View Post
Posting in the wrong forum?
Just a hint, what most people consider a "normal desktop environment". If you advocate "do as the others do", you have to make sure, that these others are real.

BTW: The whole point of partitioning is to make a system more robust against crashes, file system corruption and of course free space exhaustion. Having a light root filesystem which can be mounted under worst circumstances to execute fsck/rm/whatever is better than having to fall back on rescue media, because something in /var has gone wrong.
 
Old 11-02-2012, 01:15 PM   #27
basil_brush
LQ Newbie
 
Registered: Oct 2012
Posts: 25

Rep: Reputation: Disabled
@GAZL..what line would you add to /etc/fstab ..i've never tried this before and would like to try.
 
Old 11-02-2012, 01:24 PM   #28
GazL
LQ Veteran
 
Registered: May 2008
Posts: 6,897

Rep: Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019
Code:
tmpfs                /tmp         tmpfs   defaults         0   0
If you want to restrict it's size (it is 50% of ram by default) add something like ",size=256" after 'defaults'

man mount and scroll down to the tmpfs section for a list of all the options.

Last edited by GazL; 11-02-2012 at 01:26 PM.
 
Old 11-02-2012, 01:28 PM   #29
basil_brush
LQ Newbie
 
Registered: Oct 2012
Posts: 25

Rep: Reputation: Disabled
Thanks Gazl, what benefit would you say this does? ..just curious to try it.
 
Old 11-02-2012, 02:17 PM   #30
GazL
LQ Veteran
 
Registered: May 2008
Posts: 6,897

Rep: Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019
Main benefit is it'll remove some unnecessary disk writes which may give you a small performance gain depending on your workload, but as reads will be satisfied from the vfs cache anyway, you're probably not going to notice a massive difference.
 
  


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
installing slackware on external usb (GUID partition scheme) pindar Slackware - Installation 3 03-28-2012 12:31 PM
Slackware partition scheme help bigbooty Linux - Newbie 8 04-24-2011 02:53 PM
[SOLVED] slackware/multiB partition scheme suggestion (newbie here, just deleted M$ windows) Ubunoob001 Slackware 3 10-20-2010 08:31 AM
Not sure on this partition scheme ComputerMan Slackware 8 01-14-2007 04:25 PM
Partition Scheme Jaster Debian 6 11-13-2004 03:28 PM

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

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