Skip to contentSkip to conversation

tuning a fs for large number of small files

DISCUSSION Marko Asplund 3 participants 3 messages Nov 6, 2002 – Nov 10, 2002 1 message not in the archive

lore
Share & tools
lore
#1 lore raw
In reply to a message not in the archive
Quoted 9 lines · Ragnar Kjørstad

...
If you have the chance you can tar together all the files, and extract them again. This will help in two ways:
- reduce fragmentation
- write files to the filesystem in reiserfs-optimal order. If you create the files in the increasing hash-order access will typlicly be much faster. If you create a tar of the files from a reiserfs-filesystem (with the same hash) you will accomplish just that.

i was thinking about using something like the following method for migrating the files to the new filesystem:
tar clf - /mnt/oldext3fs | tar xf -

this should reduce fragmentation but will it write the files in filesreiserfs-optimal order?

Quoted 3 lines

What hash-function to use doesn't really matter unless you have a lot of files in a single directory. Do you have that? Is there any typlical "pattern" for the filenames, and the order they are created in?

there shouldn't be particularly many files in a single directory. the filesystem is actually a hierarchy "database" for our backup system (Arkeia) and it replicates the filesystem trees of the machines being backed up. i can't come up with a typical file naming or creation order patterns. most of the directory hierarchies are quite static except for the home directories perhaps.

best regards,

Signature · 1 line
	aspa
#2 lore raw
Quoted 23 lines · Marko Asplund
Quoted 9 lines · Ragnar Kjørstad

...
If you have the chance you can tar together all the files, and extract them again. This will help in two ways:
- reduce fragmentation
- write files to the filesystem in reiserfs-optimal order. If you create the files in the increasing hash-order access will typlicly be much faster. If you create a tar of the files from a reiserfs-filesystem (with the same hash) you will accomplish just that.

i was thinking about using something like the following method for migrating the files to the new filesystem:
tar clf - /mnt/oldext3fs | tar xf -

this should reduce fragmentation but will it write the files in filesreiserfs-optimal order?

Quoted 3 lines

What hash-function to use doesn't really matter unless you have a lot of files in a single directory. Do you have that? Is there any typlical "pattern" for the filenames, and the order they are created in?

Quoted 7 lines

there shouldn't be particularly many files in a single directory. the filesystem is actually a hierarchy "database" for our backup system (Arkeia) and it replicates the filesystem trees of the machines being backed up. i can't come up with a typical file naming or creation order patterns. most of the directory hierarchies are quite static except for the home directories perhaps.

Speak of the devil. (Arkeia) We have a similar setup to what you described, our Arkeia server handles about 1TB of data per full backup, consisting of over 25 million files. We keep the Arkeia database on reiserfs 3.x using these mount options:

defaults,noatime,notail,nodiratime

Though reiserfs handles all the small files without a problem, we found that hacking the kernel to disable fdatasync was the only way to get decent speeds from Arkeia. Beware though, Arkeia does like to crash often, so this usually means more database restores (like I'm doing right now), but our backup just wouldn't fit in the window otherwise.

Regardless, Arkeia just can't handle our load well at all, it's database is just way to inefficient and there support is terrible at best. Honestly I wouldn't recommend Arkeia to my worst enemy if they need to backup more then a few gigs.

Signature · 10 lines
Best Regards,
 
Mike Benoit
NetNation Communication Inc.
Systems Engineer
Tel: 604-684-6892 or 888-983-6600
 ---------------------------------------
 
 Disclaimer: Opinions expressed here are my own and not 
 necessarily those of my employer
#3 lore raw
In reply to Marko Asplund
Quoted 54 lines · Mike Benoit
Quoted 28 lines · Marko Asplund
Quoted 11 lines · Ragnar Kjørstad

...
If you have the chance you can tar together all the files, and extract them again. This will help in two ways:
- reduce fragmentation
- write files to the filesystem in reiserfs-optimal order. If you create the files in the increasing hash-order access will typlicly be much faster. If you create a tar of the files from a reiserfs-filesystem (with the same hash) you will accomplish just that.

i was thinking about using something like the following method for migrating the files to the new filesystem:
tar clf - /mnt/oldext3fs | tar xf -

this should reduce fragmentation but will it write the files in filesreiserfs-optimal order?

Quoted 5 lines

What hash-function to use doesn't really matter unless you have a lot of files in a single directory. Do you have that? Is there any typlical "pattern" for the filenames, and the order they are created in?

Quoted 9 lines

there shouldn't be particularly many files in a single directory. the filesystem is actually a hierarchy "database" for our backup system (Arkeia) and it replicates the filesystem trees of the machines being backed up. i can't come up with a typical file naming or creation order patterns. most of the directory hierarchies are quite static except for the home directories perhaps.

Speak of the devil. (Arkeia) We have a similar setup to what you described, our Arkeia server handles about 1TB of data per full backup, consisting of over 25 million files. We keep the Arkeia database on reiserfs 3.x using these mount options:

defaults,noatime,notail,nodiratime

Though reiserfs handles all the small files without a problem, we found that hacking the kernel to disable fdatasync was the only way to get decent speeds from Arkeia. Beware though, Arkeia does like to crash often, so this usually means more database restores (like I'm doing right now), but our backup just wouldn't fit in the window otherwise.

Quoted 7 lines

Regardless, Arkeia just can't handle our load well at all, it's database is just way to inefficient and there support is terrible at best. Honestly I wouldn't recommend Arkeia to my worst enemy if they need to backup more then a few gigs.

copy your data twice, once to reiserfs, and then again to reiserfs. This will cause objectids to be assigned in reiser3 readdir() sorted order (ext3 does not sort).