Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
ext4 inode settings?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
FizzyWidget
Veteran
Veteran


Joined: 21 Nov 2008
Posts: 1133
Location: 127.0.0.1

PostPosted: Mon Mar 18, 2013 10:56 am    Post subject: ext4 inode settings? Reply with quote

Currently I am about to re-do all my systems to try and tweak as much performance out of them as I can

I have been reading up that you should tweak the inode count for each partition depending on what you will have on there

currently all my systems are set the same way

laptop

sad1 - boot - 100m
sda2 - swap - 1G
sda3 - root - 15G
sda4 - home - rest of disc

Server and main pc

same as above

sdb1 - store1 - 500g
sdc1 - store2 - 500g
sdd1 - store3 - 500g

all drives will have a mixture of small and large files on them, so I am wondering if i should go ext4 and tweak indoes for the /home folder on laptop and store folders, or use xfs for server and main pc ?

I know there is no hard and fast rule to this and you can set them anyway you wish, and maybe tweaking the settings will give no performance increase what so ever, but i would like to make the partitions as space efficient and as fast as possible.

Thanks DF
_________________
I know 43 ways to kill with a SKITTLE, so taste my rainbow bitch.
Back to top
View user's profile Send private message
aCOSwt
Bodhisattva
Bodhisattva


Joined: 19 Oct 2007
Posts: 2537
Location: Hilbert space

PostPosted: Mon Mar 18, 2013 11:21 am    Post subject: Re: ext4 inode settings? Reply with quote

Dark Foo wrote:
Currently I am about to re-do all my systems to try and tweak as much performance out of them as I can

OK then you are ready to rethink your entire partition scheme as well ?
Of course you understand that your freedom in tweaking largely depends on how much dedicated your partitions are.
You could think of dedicated /tmp dedicated /var with portage's tree on it / dedicated /usr/portage/distfiles... and so on.
While you are at it, may I also suggest you to have a look to a not widely known rather new feature of ext4 filesystems sarting with 3.8 : Ext4 embeds very small files in the inode which might well influence your choice.
Of course, I do not mean one should adopt this form of storage, I simply mean that the question is to be considered when thinking about tweaking ext4.

When your choice is done, please come back for tweaking suggestions.
_________________
Back to top
View user's profile Send private message
FizzyWidget
Veteran
Veteran


Joined: 21 Nov 2008
Posts: 1133
Location: 127.0.0.1

PostPosted: Mon Mar 18, 2013 11:25 am    Post subject: Re: ext4 inode settings? Reply with quote

aCOSwt wrote:
Dark Foo wrote:
Currently I am about to re-do all my systems to try and tweak as much performance out of them as I can

OK then you are ready to rethink your entire partition scheme as well ?
Of course you understand that your freedom in tweaking largely depends on how much dedicated your partitions are.
You could think of dedicated /tmp dedicated /var with portage's tree on it / dedicated /usr/portage/distfiles... and so on.
While you are at it, may I also suggest you to have a look to a not widely known rather new feature of ext4 filesystems sarting with 3.8 : Ext4 embeds very small files in the inode which might well influence your choice.

When your choice is done, please come back for tweaking suggestions.


i did have this setup once

/ -100m
/root -15G
/swap -1G
/home - rest of disc
/usr/portage/disfiles -2G
/tmp -2G (but then having it this small I couldn't compile libre office)
/var -2G

suppose i could go back to that setup
_________________
I know 43 ways to kill with a SKITTLE, so taste my rainbow bitch.
Back to top
View user's profile Send private message
aCOSwt
Bodhisattva
Bodhisattva


Joined: 19 Oct 2007
Posts: 2537
Location: Hilbert space

PostPosted: Mon Mar 18, 2013 11:33 am    Post subject: Reply with quote

OK then question 2... and maybe the most important : Are you ready to rework all this and tune everything knowing that, at best, you can expect a +(5-7)% diskspace and a theoretically certain but... almost not-measurable performance gain ?
_________________
Back to top
View user's profile Send private message
FizzyWidget
Veteran
Veteran


Joined: 21 Nov 2008
Posts: 1133
Location: 127.0.0.1

PostPosted: Mon Mar 18, 2013 11:41 am    Post subject: Reply with quote

Yes as I am bored, and have depression, and need to do something to keep me occupied :p

I could leave it the same, I just thought I would seek advice on it before I did it :)

I suppose now it comes down to which FS for home and the storage drives, seeing as there are movies, images and music on there
_________________
I know 43 ways to kill with a SKITTLE, so taste my rainbow bitch.
Back to top
View user's profile Send private message
aCOSwt
Bodhisattva
Bodhisattva


Joined: 19 Oct 2007
Posts: 2537
Location: Hilbert space

PostPosted: Mon Mar 18, 2013 12:48 pm    Post subject: Reply with quote

OK then, this is what I do for a daw.
Do not necessarily do the same, what follows being more a collection of ideas for tweaking.

1/ Use cfdisk from util-linux for partitioning !
cfdisk because it allows you to easily maximize disk usage on partitions. (Expect the equivalent of a track...)
OK, fdisk automatically maximizes but then... you just do not realize your win and cfdisk additionally gets a highly depressive nice 1980s curses interface...

OK then, a little bit more seriously...

2/ /boot
I made an ext4 / 32Mb.
You'll notice a huge inode_ratio (You keep there essentially kernel bzImages that is to say not many files around 3Mb each)
Not many files => dir_index = no
No huge file => huge_file = no
Big files => Blocksize = 4096
inode_size=128 because I do not make use of any particular extended attribute and don't care nanoseconds timestamps.
I will never ever have to resize it => resize_inode = extra_isize = no.
(Note that has_journal can seems surprising for a boot fs but, in my particular use case, I play a lot with this partition I never mount read-only.
Any standard user mounting this partition read-only can avoid journaling here.)
Follows is the corresponding entry in my /etc/mke2fs.conf
Code:
        G64_BOOT = {
                features = has_journal,ext_attr,^resize_inode,^dir_index,filetype,extent,flex_bg,sparse_super,large_file,^huge_file,uninit_bg,^dir_nlink,^extra_isize
                blocksize = 4096
                inode_ratio = 524288
                inode_size = 128
        }


3/ TMPS
I made a general tmp purpose partition on which I 'll mount-bind /tmp and /var/tmp (14Gb)
I made it ext2-like because I do not need journaling.
More standard inode_ratio because it will host about... I cannot tell precisely what at mkfs time...
Id above, don't care of xattrs, huge_file, resizing...
Could host a big amount of files => care about dir_index.
Follows is the corresponding entry in my /etc/mke2fs.conf
Code:
        G64_XTMP = {
                features = ^has_journal,ext_attr,^resize_inode,dir_index,filetype,^extent,^flex_bg,sparse_super,large_file,^huge_file,^uninit_bg,^dir_nlink,^extra_isize
                blocksize = 4096
                inode_ratio = 32768
                inode_size = 128
        }


4/ /var (4Gb)
In addition with all traditional logs / queues... I use var to store the portage's tree as well as my local overlay : Huge number of small files.
=> Impact on blocksize and inode_ratio.
Same as above for the rest apart from journaling.
It is currently : 21% blocks used and 40% inodes used. => Maybe I should think about halving the inode_ratio...
Code:
        G64_VAR = {
                features = has_journal,ext_attr,^resize_inode,dir_index,filetype,extent,flex_bg,sparse_super,large_file,^huge_file,uninit_bg,^dir_nlink,^extra_isize
                blocksize = 2048
                inode_ratio = 8192
                inode_size = 128
        }


5/ root (96Gb)
Well... since I do not want to bother with initramfs thingies... my formerly independent (/usr & /opt) joined /...
Same observations as above.
It is currently 29% blocks used and 17% inodes used.
Code:
        G64_ROOT = {
                features = has_journal,ext_attr,^resize_inode,dir_index,filetype,extent,flex_bg,sparse_super,large_file,^huge_file,uninit_bg,^dir_nlink,^extra_isize
                blocksize = 4096
                inode_ratio = 32758
                inode_size = 128


6/ home (334Gb)
Well... same observations as above... I never imagined that I would have to host so much big files onto it...
Despite the rather huge inode_ratio, it is currently 25% blocks used and... 5% inodes used... only. !
Will think about twicing the inode_ratio whenever I reach your depressed state... and want to spare a couple of sectors... :D
Code:
        G64_HOME = {
                features = has_journal,ext_attr,^resize_inode,dir_index,filetype,extent,flex_bg,sparse_super,large_file,^huge_file,uninit_bg,^dir_nlink,^extra_isize
                blocksize = 4096
                inode_ratio = 262144
                inode_size = 128
        }


OK, hope this helps. Once more, just as representing my opinion on my own system and to serve as tweaking suggestions.

But... once more... read about this inside-inode data story... you might / or not consider wise to reconsider the inode_size.
_________________


Last edited by aCOSwt on Fri Mar 22, 2013 8:40 am; edited 1 time in total
Back to top
View user's profile Send private message
FizzyWidget
Veteran
Veteran


Joined: 21 Nov 2008
Posts: 1133
Location: 127.0.0.1

PostPosted: Mon Mar 18, 2013 12:57 pm    Post subject: Reply with quote

think I should leave it as is then, still going to reinstall the systems, but this time use clonezilla to image them so I have a fresh image and system should I ever need to re-install due to user error :p

Thanks for the help and advice :)
_________________
I know 43 ways to kill with a SKITTLE, so taste my rainbow bitch.
Back to top
View user's profile Send private message
aCOSwt
Bodhisattva
Bodhisattva


Joined: 19 Oct 2007
Posts: 2537
Location: Hilbert space

PostPosted: Fri Mar 22, 2013 8:34 am    Post subject: Reply with quote

In case anyone (else than the OP :wink: ) is interested in tuning his fs, I realize that I did not document the "extent" feature I set for every fs apart from the tmp.
This feature is set in order to enable the user to run the e4defrag defragment utility.
Of course, it makes no sense for tmps.
_________________
Back to top
View user's profile Send private message
FizzyWidget
Veteran
Veteran


Joined: 21 Nov 2008
Posts: 1133
Location: 127.0.0.1

PostPosted: Fri Mar 22, 2013 5:19 pm    Post subject: Reply with quote

hmmm, didnt think that was stable yet, and I havent looked at the mke2fs.conf in /etx to see if it is a default setting or not, ah well
_________________
I know 43 ways to kill with a SKITTLE, so taste my rainbow bitch.
Back to top
View user's profile Send private message
aCOSwt
Bodhisattva
Bodhisattva


Joined: 19 Oct 2007
Posts: 2537
Location: Hilbert space

PostPosted: Fri Mar 22, 2013 6:25 pm    Post subject: Reply with quote

Dark Foo wrote:
hmmm, didnt think that was stable yet

e4defrag is part of the e2fsprogs-1.42 current stable package.
_________________
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum