SEARCH

Enter your search query in the box above ^, or use the forum search tool.

You are not logged in.

#1 2010-07-24 18:30:45

Pagan
Member
From: Seattle
Registered: 2010-07-18
Posts: 16
Website

File System Tweaks

First off at the very, very minimum one needs to slice up their drives with -

/boot
/
/var/log
/home

Also I would recommend an additional slice for /tmp also, but that depends on how much drive space you have, 2-4 Gig is usually fine

Reason for the extra slices is boot really does need to be secure and root needs to be isolated from home and log.   For those who just put everything on one slice just get a buggy daemon or something that fills up and corrupts your file system wink

Anyway for a basic set up I'd do this to squeak a bit of performance, with the following slicing scheme as -

/dev/sda1     ext2       /boot      (around 256MB is fine)
/dev/sda2     ext4       /              (depending on drive, I usually go for around 12 - 15 GB)
/dev/sda5     ext4       /var/log  (around 256MB is fine)
/dev/sda4     swap                     (me, I usually only have about 1 GB)
/dev/sda6     ext4       /home     (rest of the drive space)

For /var/log while booted into a boot disk or Live CD tweak /var/log with -

tune2fs -o journal_data_writeback /dev/sda5
tune2fs -O ^has_journal  /dev/sda5

Then mount root to /mnt with

mount /dev/sda2 /mnt
cd /mnt/etc

Edit fstab with what ever tool you're comfortable with, vi or nano.  I use vi so I would execute this

vi /mnt/etc/fstab

The options for the modified file systems are -

# / was on /dev/sda2 during installation
UUID=xxxxxxxxx    /               ext4        relatime,errors=remount-ro            0 1
# /boot was on /dev/sda1 during installation
UUID=xxxxxx         /boot           ext2        noatime,defaults            0 1
# /home was on /dev/sda6 during installation
UUID=xxxxxx        /home           ext4        relatime            0 2
# /var/log was on /dev/sda5 during installation
UUID=xxxxxxx      /var/log        ext4        noatime,data=writeback            0 1

What this does is increase read/writes to file systems where you don't need the precautions like that of journaling for example.  There is a lot a activity with /var/log so this would tweak out a bit of performance.  If you're on an old laptop also you may want to turn off journaling, then set noatime and writeback on all slices also if it's on a very sluggish system.  But be aware though you loose the ability to recover from a crash.  But on old hardware one has to do what one has to wink


Where Thought Crime is committed
http://www.rejecttheherd.net

Offline

Be excellent to each other!

#2 2010-09-10 02:25:47

yahya
New Member
From: Sulaco
Registered: 2010-09-09
Posts: 2

Re: File System Tweaks

:|and so we should all stand, clap, cheer, and follow you blindly?...


I welcome the day when I shall take the last train to Clarksville and meet her at the station. I can't soo wait to meet her. sigh

Offline

#3 2010-09-10 09:49:48

iggykoopa
Script Master
Registered: 2008-12-13
Posts: 1,486

Re: File System Tweaks

good advice for older machines. If you have the ram to spare and don't mind losing the logs on reboot you can mount /var/log and /tmp on a ramdisk, that'll help a little too.


I say never be complete, I say stop being perfect, I say lets evolve, let the chips fall where they may.

Offline

#4 2010-09-10 23:51:12

iann
#! Die Hard
Registered: 2010-09-10
Posts: 708

Re: File System Tweaks

Still recommending /swap on a separate partition?  And a monolithic chunk of swap space?  I'm no expert but I read that there are better ways of doing this now.

Offline

#5 2010-11-09 15:04:05

alef
#! CrunchBanger
Registered: 2009-02-05
Posts: 199

Re: File System Tweaks

Hi,

Thanks for these tips.

I have just found some explanation about noatime, relatime and atime option, maybe it can be useful for some people not knowing what it is like I just was: http://linux.koolsolutions.com/2009/01/ … t-options/

May I ask why /boot partition is in ext2 ?

I am planning to switch to statler as main system via a clean install on my eeepc; do you guys recommend ext4 or another file system (home usage for that machine)?

thanks,


Eee-PC 1000H    |  Statler r20110207 Openbox
Vaio VGN-FE21H  |  Statler r20110207 Openbox
Thinkpad X1Carbon | Waldorf r20121015
-- I live well without owning a printer.

Offline

#6 2010-11-09 15:23:52

snowpine
#!-a-roo
Registered: 2008-11-24
Posts: 2,922

Re: File System Tweaks

alef wrote:

I am planning to switch to statler as main system via a clean install on my eeepc; do you guys recommend ext4 or another file system (home usage for that machine)?

I use (and recommend) ext4 on my netbook SSD. Almost 2 years and counting of obsessive daily use, no problems yet.

My "partitioning scheme" is a single ext4 partition that spans the entire tiny (8gb) drive. There is no "one size fits all" solution for every user.


/hugged

Offline

#7 2010-11-09 15:58:38

Unia
#! Octo-portal-pussy
From: The Netherlands
Registered: 2010-07-17
Posts: 3,962

Re: File System Tweaks

Ext4 is generally regarded as the best option and most people use it. For SSD's, I think there is some tweaking one has to do to ensure it's lifetime, but I don't own one so I can't tell you. Snowpine doesn't mention anything about tweaks though and since he uses one, I guess it's a better option to follow his advice regarding SSD's.

For a regular HDD, no tweaking is required.


If you can't sit by a cozy fire with your code in hand enjoying its simplicity and clarity, it needs more work. --Carlos Torres
Github

I am a #! forum moderator. Feel free to send me a PM with any question you have!

Offline

#8 2010-11-09 16:05:13

snowpine
#!-a-roo
Registered: 2008-11-24
Posts: 2,922

Re: File System Tweaks

I think I chose the 'noatime' option (can't remember and I'm not at that computer right now).

I lurk on several Linux forums and I have never, not once, heard of a single user wearing out their SSD running Linux. It's a myth. smile

On the other hand, I did destroy a conventional HDD once (while defragging Windows XP)...


/hugged

Offline

#9 2010-11-09 16:30:21

pvsage
Internal Affairs
From: North Carolina
Registered: 2009-10-18
Posts: 12,508

Re: File System Tweaks

My SSD partitions (root and home) are both ext3, noatime, relatime.  Runs great.

I've heard of one Dell Mini user killing a SSD, but this was due to mechanical/thermal damage, not writes.


I'm a moderator here.  How are we doing?  Feedback is encouraged.

Online

#10 2010-11-09 17:02:06

Unia
#! Octo-portal-pussy
From: The Netherlands
Registered: 2010-07-17
Posts: 3,962

Re: File System Tweaks

Hmm, maybe I should consider getting one. Oh well.. don't have the money atm. sad


If you can't sit by a cozy fire with your code in hand enjoying its simplicity and clarity, it needs more work. --Carlos Torres
Github

I am a #! forum moderator. Feel free to send me a PM with any question you have!

Offline

#11 2010-11-09 17:31:04

alef
#! CrunchBanger
Registered: 2009-02-05
Posts: 199

Re: File System Tweaks

thanks all for your answers.

Unia wrote:

For a regular HDD, no tweaking is required.

Do I understand well: you are considering here tweaking regarding drive lifetime, and Pagan's post rather refers to performance.

I have a regular HDD, no SSD, but was considering to follow part of his advices to have better performance and security.

always open for suggestions.


Eee-PC 1000H    |  Statler r20110207 Openbox
Vaio VGN-FE21H  |  Statler r20110207 Openbox
Thinkpad X1Carbon | Waldorf r20121015
-- I live well without owning a printer.

Offline

#12 2010-11-09 17:42:58

Unia
#! Octo-portal-pussy
From: The Netherlands
Registered: 2010-07-17
Posts: 3,962

Re: File System Tweaks

Sure, there are options to tweak it for optimal performance, but I don't think you will notice any big difference as a regular user; ext4 will do. Don't get too confused by all the filesystem types out there.


If you can't sit by a cozy fire with your code in hand enjoying its simplicity and clarity, it needs more work. --Carlos Torres
Github

I am a #! forum moderator. Feel free to send me a PM with any question you have!

Offline

#13 2010-11-09 19:31:31

boromeus
#! Junkie
Registered: 2010-09-12
Posts: 254

Re: File System Tweaks

Separate partition for your data is also recommended, as it's not very good to store important things in your /home folder (together with just downloaded "funny" pictures, browser cache, instant messenger log and other crap.)

/home is excellent for keeping your config files for different apps you want to use after a reinstall (unless you distro-hop... in this case it may be safer to manually reconfigure each application's settings) but not for your private things like home video and PhD thesis.

The /data partition shouldn't be messed up with different hidden folders, and it should always be available neatly, regardless what distro you use from the ones that exist on your computer or other live systems. Since its content is usually irreproducible - best thing we can do is to clone this partition as frequently as possible.

(IMHO)

Offline

#14 2010-11-09 20:19:38

snowpine
#!-a-roo
Registered: 2008-11-24
Posts: 2,922

Re: File System Tweaks

You should always have an external backup of your PhD thesis and other important documents (on an external drive, a CD, a thumb drive, over the network, etc.).

If your computer is stolen or destroyed, it does not matter whether your documents are on /home or a separate data partition. smile


/hugged

Offline

#15 2010-11-09 20:28:07

boromeus
#! Junkie
Registered: 2010-09-12
Posts: 254

Re: File System Tweaks

snowpine wrote:

You should always have an external backup of your PhD thesis and other important documents (on an external drive, a CD, a thumb drive, over the network, etc.).

If your computer is stolen or destroyed, it does not matter whether your documents are on /home or a separate data partition. smile

Of course. That's default for me. I use CDs and Dropbox paralelly.... sometimes I even upload a file into my gmail account.

Offline

#16 2010-11-09 21:32:30

GuruX
#! Die Hard
Registered: 2009-01-18
Posts: 527

Re: File System Tweaks

When it comes to backups, I prefer scattering my most important files around. Two copies on different HDDs in the same computer. Then another copy on a computer that isn't in the same house (usually at my mom's) and then somewhere on the internet, like dropbox or SkyDrive. Keeping copies on the same physical location is a really bad idea if someones decides to start a fire.

As for the partitioning, my Eee 900 runs the whole 16gb SSD as one Ext4 partition. /tmp on ramdisk. 1GB ram is seldom filled under Statler.

Offline

#17 2010-11-09 22:24:40

boromeus
#! Junkie
Registered: 2010-09-12
Posts: 254

Re: File System Tweaks

btw, how do you make ramdisk for /tmp?

Offline

#18 2010-11-10 08:55:01

alef
#! CrunchBanger
Registered: 2009-02-05
Posts: 199

Re: File System Tweaks

boromeus wrote:

btw, how do you make ramdisk for /tmp?

I think the technique is explained here: http://crunchbanglinux.org/wiki/crunche … ll_tips?s\[]=fstab#purge_logfiles_at_boot


Eee-PC 1000H    |  Statler r20110207 Openbox
Vaio VGN-FE21H  |  Statler r20110207 Openbox
Thinkpad X1Carbon | Waldorf r20121015
-- I live well without owning a printer.

Offline

#19 2010-11-10 11:46:29

boromeus
#! Junkie
Registered: 2010-09-12
Posts: 254

Re: File System Tweaks

^
thx

Offline

Board footer

Powered by FluxBB

Copyright © 2012 CrunchBang Linux.
Proudly powered by Debian. Hosted by Linode.
Debian is a registered trademark of Software in the Public Interest, Inc.

Debian Logo