full ext3 filesystems

Submitted by Anonymous
on July 26, 2007 - 7:02am

I am looking for any information regarding the use of an ext3 filesystem in an almost full state. By mistake, a number of our filesystem were used at nearly 100% (870G/880G). The filesystem is continuously full as a file of ~1GB (it changes) is deleted and another one is added. This continues ad infinitum. We are unable to reformat or delete all files from these filesystem. However, we have increased the amout of free space per volume so that the usage is at 97% and will eventually be deceased to 95%.

The consequence of this has been bad write performance on the volume. The hypothesis is that this is due to fragmentation. We have improved matters somewhat by tuning the I/O scheduler but some files are still fragmented badly. Can we expect the fragmentation to eventually decrease now that the free space is greater? Is the usage pattern feasible in the long run?

Any ideas??

Thanks

when i say unable, i mean

Anonymous (not verified)
on
July 26, 2007 - 7:07am

when i say unable, i mean unable in that i am being restricted by external reasons .. i could however do an rm -rf, but i will never return to my job again!

Yes, pushing ext3 to a full

Anonymous (not verified)
on
July 27, 2007 - 1:07am

Yes, pushing ext3 to a full state will generally induce fragmentation. I remember Ted Tso stating once on the ext3 mailling list that this was one of the reasons that ext3 reserves 5% for root by default. One is for administration purposes (keep root from being locked by full filesystems), the other is to keep the filesystem from fragmenting badly. Ext3 tries its best to avoid such things, but when your only available blocks are scattered around and you're 99% full, your options are limited.

I assume adding more disks is out of the question (isn't it always). Best thing you could probably do is find some space (or attach a spare drive), tar -zcvf the data off, rm -rf the filesystem, and lay the tar back down. In that case, at least you'll know the empty blocks are all at the end of the filesystem.

That would help if you're deleting and recreating the last file over and over. But if you're repeatedly deleting and recreating random files, you'll soon be back where you are.

I'd suggest grabbing a random set of files (some old some new) and spot checking them with filefrag to get an estimate on how bad things are.

As well, avoid any tool that claims it can defrag your filesystem for you. The risk of loss of data is too large...

I can free up a bit of space

Anonymous (not verified)
on
July 27, 2007 - 1:46am

I can free up a bit of space and then from this point on keep the filesystem at 95%, however, I am uncertain that this is feasible in the long-run .. Can I use a filesystem like this?

An other question .. does

Anonymous (not verified)
on
July 27, 2007 - 1:47am

An other question .. does ext3 lay files down contiguously? I thought that it may be random-ish?

Performance on full disks is an old problem

Anonymous (not verified)
on
July 27, 2007 - 5:47am

Ext3 is not a good choice when deleting large files is common.
You will get better results with JFS or XFS.

All filesystems have difficulty when the device is nearly full.
880GB is not that big, and disks are cheap. Almost certainly cheaper
than finding a way to get good performance on a full disk.

It's not cheap if it's an

Anonymous (not verified)
on
July 27, 2007 - 6:02am

It's not cheap if it's an old SCSI RAID5 array with 80GB disks.

Beside that RAID5 is evil. You should better go for RAID1 with 10000 rpm sata disk.

The filefrag program will

Anonymous (not verified)
on
July 27, 2007 - 5:58am

The filefrag program will tell you how fragmented a file is.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.