Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Some information for creating ext3 filesystem
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo on AMD64
View previous topic :: View next topic  
Author Message
small_boy22
n00b
n00b


Joined: 30 Sep 2005
Posts: 4

PostPosted: Wed Feb 01, 2006 4:22 pm    Post subject: Some information for creating ext3 filesystem Reply with quote

I want to use ext3 for a disk that I have which is mainly for storage of movies, mp3 and stuff..
So I have some questions:

1)What should I use with the -T option: 4K(news) or 1MB(largefile) ?
-> The disk capacity is 200GB.

2)What type of journal should I use ?
full journal, metadata-only etc.. ?

This hard disk is gonna be strictly for storage and not a fileserver or anything else..
I will use 2.6 kernel.
Back to top
View user's profile Send private message
loftwyr
l33t
l33t


Joined: 29 Dec 2004
Posts: 970
Location: 43°38'23.62"N 79°27'8.60"W

PostPosted: Wed Feb 01, 2006 4:36 pm    Post subject: Reply with quote

What kind of Drive is it? SATA? IDE? SCSI?

If it's only for storage, it doesn't matter much, none of the options will really matter if the drive isn't high demand. If you're watching movies or listening to MP3s, you're not stressing the drive enough for optimizations to matter.
_________________
My emerge --info
Have you run revdep-rebuild lately? It's in gentoolkit and it's worth a shot if things don't work well.
Celebrating 5 years of Gentoo-ing.
Back to top
View user's profile Send private message
6D7474
Tux's lil' helper
Tux's lil' helper


Joined: 08 Sep 2005
Posts: 135

PostPosted: Wed Feb 01, 2006 4:45 pm    Post subject: Reply with quote

the best thread about optimizing ext3:
https://forums.gentoo.org/viewtopic-t-305871.html
Back to top
View user's profile Send private message
engineermdr
Apprentice
Apprentice


Joined: 08 Nov 2003
Posts: 295
Location: Altoona, WI, USA

PostPosted: Wed Feb 01, 2006 5:16 pm    Post subject: Re: Some information for creating ext3 filesystem Reply with quote

Agreed! That thread is excellent. A must read for everyone.

Using the -T largefile option reduces the number of inodes and will free up quite a bit of space on the drive. Since you'll only be storing large files, you might as well use that space for storing your media files and not wasted on unused inodes. You'll also find mke2fs and e2fsck run faster with fewer inodes. Note that the number of inodes only limits the number of files you can store, not the size of those files, so in your case of 200GB and largefile, you can have up 200K files. If that doesn't feel quite right, use the -i option instead to manually specify the space/inode ratio directly.

I've always just done full journaling to be safe and have never been disappointed with performance.
Back to top
View user's profile Send private message
small_boy22
n00b
n00b


Joined: 30 Sep 2005
Posts: 4

PostPosted: Thu Feb 02, 2006 3:36 pm    Post subject: Reply with quote

Thanks for the information.
This is a SATA disk.
I've read that the dir_index option can speed up things a bit.

-T largefile sound quite a good option, but let me ask something:
If I have 1MB inodes and have a 3.5MB file of a 650.5MB file, this means that the 3.5MB == 4 inodes and 650.5MB == 651inodes ?


Are you sure that the full journal option does not slow donw things a bit ?
Is there a way to deactivate full journal later if I see that it slows things a bit ?
Back to top
View user's profile Send private message
engineermdr
Apprentice
Apprentice


Joined: 08 Nov 2003
Posts: 295
Location: Altoona, WI, USA

PostPosted: Thu Feb 02, 2006 3:45 pm    Post subject: Reply with quote

No, 1 inode per file. That's why you vary the number of inodes. If all your files are big, then you don't need as many inodes.

Yes, the dir_index option helps significantly for searches and things like directory listings.

Full journaling could be slower, but I can't tell. And I've NEVER lost data using it, unlike my reiserfs experiences. You can change the journaling later, just unmount the partitions, use tune2fs to adjust things, and remount. I think you can also override the journaling in the /etc/fstab, but I've never tried that.
Back to top
View user's profile Send private message
small_boy22
n00b
n00b


Joined: 30 Sep 2005
Posts: 4

PostPosted: Thu Feb 02, 2006 4:05 pm    Post subject: Reply with quote

Thanks, you cleared things up a bit.

less inodes = faster filesystem ?

Since 1 inode refers to 1MB i think that $A MB == $A inodes and not 1inode = 1 file, but maybe i am wrong..
Back to top
View user's profile Send private message
engineermdr
Apprentice
Apprentice


Joined: 08 Nov 2003
Posts: 295
Location: Altoona, WI, USA

PostPosted: Thu Feb 02, 2006 4:16 pm    Post subject: Reply with quote

Less inodes only appears to speed up mke2fs and e2fsck operations.

The 1MB inode comes from dividing the total disk space by the total number of inodes. Think of it as average storage space per inode.

Inodes are otherwise not related to space, each file needs one inode. Inode only define how many files you can store. There are other maps in the superblock that work like you're thinking, allocating the right number of blocks for a given file size.
Back to top
View user's profile Send private message
small_boy22
n00b
n00b


Joined: 30 Sep 2005
Posts: 4

PostPosted: Thu Feb 02, 2006 4:29 pm    Post subject: Reply with quote

oh, so using 4K inodes won't speed or slow things neither would save free space , right ?
Back to top
View user's profile Send private message
engineermdr
Apprentice
Apprentice


Joined: 08 Nov 2003
Posts: 295
Location: Altoona, WI, USA

PostPosted: Thu Feb 02, 2006 5:11 pm    Post subject: Reply with quote

The effect of the number of inodes is negligible on performance if there even is one. However, inodes have to be stored somewhere, so the more you have, the less space you have for data. Why not just try it? Format with 1 inode per 4K, mount the drive and see how much free space you have. Then format with 1 inode per 1M and see how much more you have. Setting the inodes is a trade off between the number of files you can store vs. the free space you have. Only you can decide based on what you storing there.
Back to top
View user's profile Send private message
6D7474
Tux's lil' helper
Tux's lil' helper


Joined: 08 Sep 2005
Posts: 135

PostPosted: Thu Feb 02, 2006 5:24 pm    Post subject: Reply with quote

actually most people that switched from default journaling to full jounraling notice a slight increase in performance..
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on AMD64 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