LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 01-29-2006, 10:53 PM   #1
3point2
LQ Newbie
 
Registered: Jan 2006
Distribution: Slackware 11.0
Posts: 23

Rep: Reputation: 15
Space "consumed" by ReiserFS: is ext3 better for small partitions?


Hello,
After using ext3 quite happily on my Slackware 10.0 system, I decided to repartition, upgrade to 10.2, and give reiserfs a try.
I decided I wanted a small (about 70MB) /var partition. After the whole installation was over, I ran
$ df- h
to see how well i'd guessed my partition sizes. Surprisingly, my /var partition apparently contained about 55MB and hence was already 75% full! Strangely,
$ du -hs
only reported about 20MB used space, and I couldn't figure out where the &*"%^ the remaining space was going.
I began to experiment: I tar'ed up /var, reformatted the partition to ext3, and un-tarr'ed the contents back.
df now reported the 20-something MB of used space i expected. I then switched back to reiserfs and un-tarr'ed again. Now, as before, df reported 50-something MB used.

After some experiments, my discovery is this: On a completely empty partition, Reiserfs usually has an overhead of about 33MB when using the default block size of 4096. You can see this in the output of mkreiserfs:

Count of blocks on the device: 19520
Number of blocks consumed by mkreiserfs formatting process: 8212
Blocksize: 4096

(8212*4092 = about 33MB, which is 42% usage of my partition before even adding any files!)

After some more research I noticed that mkreiserfs always seems to "consume" the same number of blocks when formatting regardless of the size of the partition (about 8000-10,000 blocks). So I did:

$ mkreiserfs --block-size 1024 /dev/hda5

which sure enough gave:

Count of blocks on the device: 78080
Number of blocks consumed by mkreiserfs formatting process: 8202
Blocksize: 1024

i.e. a more reasonable 8MB overhead, but still 10% of my 80MB partition. Consider that EXT3's overhead on the same partition with a 1024 block size is 4MB. Does my experience suggest that ext3 is a better choice on small partitions?
In the end I decided to use reiserfs with the block size set to the minimum of 512. Although this gives a very small space overhead, from what i've gathered using small block sizes degrades speed. Any opinions?

For interest: on a nearly 1GB partition, reiserfs has about the same 33MB space overhead mentioned above, while ext3 only uses around 17MB. However, I'm guessing that adding a lot of small files to the two empty filesystems would see reiserfs quickly start using less space overall than ext3? I've spent too much time on this to test it right now :-P

-Basil
 
Old 01-30-2006, 12:17 AM   #2
win32sux
Guru
 
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870

Rep: Reputation: 371Reputation: 371Reputation: 371Reputation: 371
welcome to LQ!!!

well, i experimented with a 2GB partition which i have for trying-out distros...

both ext3 and reiserfs would use 33MB on it... i assume it's for the journals, as when i formatted with ext2 only 20K was used...

so, if you don't want to change the default block sizes i'd suggest you make a 100MB partition instead of a 70MB to compensate for the space used by the journals...

Last edited by win32sux; 01-30-2006 at 12:19 AM.
 
Old 01-30-2006, 03:14 AM   #3
cs-cam
Senior Member
 
Registered: May 2004
Location: Australia
Distribution: Gentoo
Posts: 3,544
Blog Entries: 4

Rep: Reputation: 56
I've steered as far clear as I possibly can from reiserfs but I can tell you ext3 will pinch 5% of your space for a journal and /root although both can be adjusted with tune2fs.
 
Old 01-30-2006, 08:48 AM   #4
3point2
LQ Newbie
 
Registered: Jan 2006
Distribution: Slackware 11.0
Posts: 23

Original Poster
Rep: Reputation: 15
Thanks for the replies!

I remember someone making a big deal out of the fact that reiserfs doesn't preallocate inodes and a journal like ext3 does. Obviously they were either wrong or reiserfs has some sort of other space overhead that ends up having the same effect.

Well, I've decided to stick with reiserfs for a while to see how it goes, despite a very strange crash yesterday that I'm extremely suspicious had to do with my newcomer file system. It seems quite fast, and although reiserfsck takes longer than ext3 fsck at boot time, it's less annoying than the occasional forced full ext3 fsck. I've also yet to encounter an annoying buzzing noise that my HD starts to make after leaving it idle for a while (it's getting old ). I used to have to sync or cause some other kind of disk access for it to stop.

-Basil.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Can't resize ext3 partition (using "parted"). Help or advise another app, plz kornerr Linux - General 2 04-28-2005 10:01 AM
ReiserFS stuck at "Checking transaction log" after power loss zaufe Linux - Hardware 2 06-25-2004 08:44 PM
2.6.3 kernel upgrade reiserfs boot problems "no init found" riskable Mandriva 3 05-28-2004 04:11 PM
"no space left on device" - But df shows free space! monita Linux - General 7 03-30-2004 01:14 PM
Need help resizing ReiserFS "/" partitions tigerflag Linux - General 4 08-14-2003 09:00 AM


All times are GMT -5. The time now is 09:47 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration