Skip to contentSkip to conversation

ReiserFS v3 + millions of files?

DISCUSSION Dan Oglesby 9 participants 15 messages Oct 27, 2003 – Oct 30, 2003

lore
Share & tools
lore
#0 lore raw

Greetings...

Long time ReiserFS user, first time I've had a problem. Signed up for the mailing list last week, and was surprised to see so little traffic (might be a good thing?).

I'm running Red Hat 7.3 using a Red Hat 2.4.20 kernel. The system has a RAID-5 array via 3Ware 7500 controller, and three Western Digital 120GB "Special Edition" hard drives. The array is one filesystem, ReiserFS. The operating system, swap, and other files are stored on a hard drive that is on the primary IDE controller off of the motherboard.

The system is a single board computer, with a P4 3.06 GHz hyperthreaded processor (kernel is SMP enabled), 512MB of RAM, and contains a mix of ReiserFS and EXT2 filesystems on the primary drive (ReiserFS only on the array). No NFS.

The array is used to store what will basically amount to more than one million files with an average size of sixty kilobytes.

During simulations for file writes, I'm seeing write performance begin to drop dramatically after 800,000 files have been stored on the filesystem.

The filesystem is being mounted with the following options:
defaults,notail,noatime,nodiratime

The filesystem was created with default options, basically a "mkreiserfs /dev/ sda1".

Is this behavior I should expect from ReiserFS v3?

This week I will be switching from a Red Hat kernel to a vanilla kernel (from kernel.org), first the latest 2.4 kernel, then the latest 2.6 kernel. After that... I dunno.

Help?

--Dan Oglesby

#1 lore raw
Quoted 17 lines · Dan Oglesby

Greetings...

Long time ReiserFS user, first time I've had a problem. Signed up for the mailing list last week, and was surprised to see so little traffic (might be a good thing?).

I'm running Red Hat 7.3 using a Red Hat 2.4.20 kernel. The system has a RAID-5 array via 3Ware 7500 controller, and three Western Digital 120GB "Special Edition" hard drives. The array is one filesystem, ReiserFS. The operating system, swap, and other files are stored on a hard drive that is on the primary IDE controller off of the motherboard.

The system is a single board computer, with a P4 3.06 GHz hyperthreaded processor (kernel is SMP enabled), 512MB of RAM, and contains a mix of ReiserFS and EXT2 filesystems on the primary drive (ReiserFS only on the array). No NFS.

The array is used to store what will basically amount to more than one million files with an average size of sixty kilobytes.

During simulations for file writes, I'm seeing write performance begin to drop dramatically after 800,000 files have been stored on the filesystem.

The filesystem is being mounted with the following options: defaults,notail,noatime,nodiratime

The filesystem was created with default options, basically a "mkreiserfs /dev/ sda1".

Quoted 12 lines

Is this behavior I should expect from ReiserFS v3?

This week I will be switching from a Red Hat kernel to a vanilla kernel (from kernel.org), first the latest 2.4 kernel, then the latest 2.6 kernel. After that... I dunno.

Help?

--Dan Oglesby

what size directories?

Signature · 1 line
Hans
#2 lore raw
In reply to Dan Oglesby

I have unsubstantiated suspicions about VFS/dcache scalability. It would be interesting to try to determine such things as how much of ram is consumed by dcache, etc.

Mr. Demidov, how long until sys_reiser4() can be used to create a million files sized 60k using lnodes? It would be an interesting benchmarking experiment.....

sys_reiser4() sidesteps dcache....

Hans

Quoted 29 lines · Dan Oglesby

Greetings...

Long time ReiserFS user, first time I've had a problem. Signed up for the mailing list last week, and was surprised to see so little traffic (might be a good thing?).

I'm running Red Hat 7.3 using a Red Hat 2.4.20 kernel. The system has a RAID-5 array via 3Ware 7500 controller, and three Western Digital 120GB "Special Edition" hard drives. The array is one filesystem, ReiserFS. The operating system, swap, and other files are stored on a hard drive that is on the primary IDE controller off of the motherboard.

The system is a single board computer, with a P4 3.06 GHz hyperthreaded processor (kernel is SMP enabled), 512MB of RAM, and contains a mix of ReiserFS and EXT2 filesystems on the primary drive (ReiserFS only on the array). No NFS.

The array is used to store what will basically amount to more than one million files with an average size of sixty kilobytes.

During simulations for file writes, I'm seeing write performance begin to drop dramatically after 800,000 files have been stored on the filesystem.

The filesystem is being mounted with the following options: defaults,notail,noatime,nodiratime

The filesystem was created with default options, basically a "mkreiserfs /dev/ sda1".

Is this behavior I should expect from ReiserFS v3?

This week I will be switching from a Red Hat kernel to a vanilla kernel (from kernel.org), first the latest 2.4 kernel, then the latest 2.6 kernel. After that... I dunno.

Help?

--Dan Oglesby

Signature · 1 line
Hans
#3 lore raw
In reply to Dan Oglesby
Quoted 17 lines · Dan Oglesby

Greetings...

Long time ReiserFS user, first time I've had a problem. Signed up for the mailing list last week, and was surprised to see so little traffic (might be a good thing?).

I'm running Red Hat 7.3 using a Red Hat 2.4.20 kernel. The system has a RAID-5 array via 3Ware 7500 controller, and three Western Digital 120GB "Special Edition" hard drives. The array is one filesystem, ReiserFS. The operating system, swap, and other files are stored on a hard drive that is on the primary IDE controller off of the motherboard.

The system is a single board computer, with a P4 3.06 GHz hyperthreaded processor (kernel is SMP enabled), 512MB of RAM, and contains a mix of ReiserFS and EXT2 filesystems on the primary drive (ReiserFS only on the array). No NFS.

Quoted 5 lines

The array is used to store what will basically amount to more than one million files with an average size of sixty kilobytes.

During simulations for file writes, I'm seeing write performance begin to drop dramatically after 800,000 files have been stored on the filesystem.

Reiserfs (both v3 and v4) stores directory entries (names within directory) sorted by a hash of the file name. If files are created in the "random" order, that is, if hashes of names aren't more or less monotonic, reiserfs will have to modify the same block many times during insertion of large number of files. As blocks with names stop fitting into memory this means that the same block has to be fetched many times from the disk.

To confirm that this is really what the cause of your problem, please answer following questions:

1. are all your files in the same directory?
2. how names of files are generated?
3. what hash are using on reiserfs (default is r5).

Reiserfs has another problem due to its limited capability of handling hash collisions in file names. Reiser4 scales much better in this respect, and generally, works fine with scores of millions of files in one directory.

Quoted 9 lines

The filesystem is being mounted with the following options:
defaults,notail,noatime,nodiratime

The filesystem was created with default options, basically a "mkreiserfs /dev/ sda1".

Is this behavior I should expect from ReiserFS v3?

Quoted 8 lines

This week I will be switching from a Red Hat kernel to a vanilla kernel (from kernel.org), first the latest 2.4 kernel, then the latest 2.6 kernel. After that... I dunno.

Help?

--Dan Oglesby

Nikita.

#4 lore raw

Object Oriented FS

Hi All,

Any comments about the Panasas ActiveScale File System (PanFS) by Panasas?

It is supposed to be a "object oriented" FS which allows very high throughput by scaling

#5 lore raw

Re: Object Oriented FS

Quoted 7 lines · darren

allows very high
throughput by scaling

Do you know what that means? (Seriously, I don't....)

Signature · 1 line
Hans
#6 lore raw

RE: Object Oriented FS

Hans,

Do you believe this is just a marketing convention to refer to a file-system as an object oriented one? Bear in mind that Microsoft is supposed to enrich their NTFS with object support from SQL Server in their next OS. The code name for this is Longhorn.

I really can't tell what this means to a file system in terms of support. It sounds like it's intended to provide support for really large numbers of files in a single directory vs. nested ones. But I'm just not sure. Do you see a limitation, going forward, with Reiser4 and large numbers of files?

Thanks,

Mike

-----Original Message-----
From: Hans Reiser [mailto:[email protected]]
Sent: Monday, October 27, 2003 10:23 AM
To: darren
Cc: [email protected]
Subject: Re: Object Oriented FS

Quoted 7 lines · darren

allows very high
throughput by scaling

Do you know what that means? (Seriously, I don't....)

Signature · 1 line
Hans
#8 lore raw

Re: Object Oriented FS

In reply to Hans Reiser
Quoted 4 lines · Hans Reiser
Quoted 1 line · darren

allows very high throughput by scaling

Do you know what that means? (Seriously, I don't....)

Panasas (from what little I have seen of it) looks to be very similar to Lustre. Clients do not access disks directly, but rather have a mapping layer between offsets and actual data on disk (similar to LVM and VM abstractions of block devices/memory). Once client has this mapping (very small in lustre, on the order of a few hundred bytes at most), it can do IO directly to one or more storage devices hence scaling of throughput proportional to number of storage targets.

In Lustre at least, the client knows nothing about the physical layout of blocks in the file on disk, but rather just accesses one or more objects via object identifyer, offset, length so the actual layout of the on disk data can change.

Lustre is GPL, don't know about Panasas.

Cheers, Andreas
--
Andreas Dilger
http://sourceforge.net/projects/ext2resize/
http://www-mddsp.enel.ucalgary.ca/People/adilger/

#7 lore raw

Re: Object Oriented FS

In reply to Mike Young
Quoted 5 lines · Mike Young

Hans,

Do you believe this is just a marketing convention to refer to a file-system as an object oriented one?

No. Also, note that they aren't saying the fs is object oriented, they are saying the storage system is not a block device but an object server.

Quoted 3 lines

Bear in mind that Microsoft is supposed to
enrich their NTFS with object support from SQL Server in their next OS.

Reiser4 and MS are talking about different layers than Panassas when we talk about being object oriented. MS objects and Reiser4 plugins might be similar notions, I am not an NTFS expert.....

Quoted 7 lines

The
code name for this is Longhorn.

I really can't tell what this means to a file system in terms of support. It sounds like it's intended to provide support for really large numbers of files in a single directory

Uh, reiser4 does that without objects having anything to do with it. Large numbers of files in a single directory means one should use trees not linear searches.....

Quoted 4 lines

vs. nested ones. But I'm just not sure. Do you
see a limitation, going forward, with Reiser4 and large numbers of files?

We have trouble with more than 2^60 files in the filesystem.

;-)

An interesting question though is at how many files in a directory being read does dcache start to croak and sys_reiser4 becomes a performance necessity....? Maybe in a few weeks Mr. Demidov can measure that.

Quoted 27 lines

Thanks,

Mike

-----Original Message-----
From: Hans Reiser [mailto:[email protected]] Sent: Monday, October 27, 2003 10:23 AM
To: darren
Cc: [email protected]
Subject: Re: Object Oriented FS

Quoted 9 lines · darren

allows very high
throughput by scaling

Do you know what that means? (Seriously, I don't....)

Signature · 1 line
Hans
#9 lore raw

Re: Object Oriented FS

In reply to Andreas Dilger
Quoted 14 lines · Andreas Dilger
Quoted 4 lines · Hans Reiser
Quoted 1 line · darren

allows very high throughput by scaling

Do you know what that means? (Seriously, I don't....)

Panasas (from what little I have seen of it) looks to be very similar to Lustre. Clients do not access disks directly, but rather have a mapping layer between offsets and actual data on disk (similar to LVM and VM abstractions of block devices/memory). Once client has this mapping (very small in lustre, on the order of a few hundred bytes at most), it can do IO directly to one or more storage devices hence scaling of throughput proportional to number of storage targets.

Quoted 8 lines

In Lustre at least, the client knows nothing about the physical layout of blocks in the file on disk, but rather just accesses one or more objects via object identifyer, offset, length so the actual layout of the on disk data can change.

Lustre is GPL, don't know about Panasas.

Cheers, Andreas

Reading the following, it appears that something _should_ be GPL...

From http://www.panasas.com/object_storage_arch.html

"Panasas is committed to drive the development of standards for the object-based storage. Through the ANSI T10 committee, Panasas is working with industry leaders including EMC, IBM, Intel, and Seagate to ensure that open-source, reference implementations of object-based storage designs are available and driven through an open standards process."

From http://www.panasas.com/directflow.html

"For the operating system on client server nodes to directly read and write data objects, an installable file system must be deployed. The DirectFLOW client installs as a local file system under Linux and is transparent to the operating system and applications above it. This installable file system manages the striping of data objects across StorageBlades on a per-object basis, and unlike standard RAID arrays, has the ability to optimize data layout and RAID level by each object. DirectFLOW thereby enables high-performance simultaneous data access for large numbers of clients to many files."

The fairly large .pdf files available for download seem to be short (2-page), prettied-up versions of the information available at the above URLs.

Steven

#11 lore raw
In reply to Dan Oglesby

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Dan Oglesby wanted us to know:

Quoted 2 lines

The array is used to store what will basically amount to more than one million files with an average size of sixty kilobytes.

If I had to make an educated guess, you're doing something similar to what I'm doing. That's all you'll get out of me for now :-)

Quoted 2 lines

During simulations for file writes, I'm seeing write performance begin to drop dramatically after 800,000 files have been stored on the filesystem.

Hmmm, I did some tests that I went up to 300,000 files with an average size of 20Kbytes. The end application will be targeted at 6.5 million files with the same average 20Kbyte size.

For my tests, I compared EXT3, XFS, reiser(tails), and reiser(notail). The results are at http://www.mrball.net/file%20creation%20tests.html

After reading your post, I'm going to repartition and repeat my tests with much larger filecounts.

Quoted 2 lines

The filesystem is being mounted with the following options:
defaults,notail,noatime,nodiratime

I'll repeat with noatime and nodiratime, but my simple little benchmark opens(creates), writes, and closes. Very little affect by my guestimation will be felt by those two. Maybe I'm wrong though.

Quoted 2 lines

The filesystem was created with default options, basically a "mkreiserfs /dev/ sda1".

I made it a point of using slow IDE drives for my tests. They were done on a 5400 RPM IDE drive.
- --
Blue skies... Todd Public key: http://www.mrball.net/todd.asc
Favourite shell: bash, though I also like 'init=/usr/bin/emacs'
--Andrew Tridgell
Linux kernel 2.4.22-10mm.2mdk 1 user, load average: 0.00, 0.03, 0.06
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (GNU/Linux)
Comment: http://www.mrball.net/todd.asc

iD8DBQE/n1hBIBT1264ScBURAhc7AKDkwHfhMXdbkEN14d2FVrwsb1A7YgCgymmN bFouT/2wnIEA6N3fd4u6q3Q=
=xoll
-----END PGP SIGNATURE-----

#13 lore raw

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hans Reiser wanted us to know:

Quoted 3 lines
Quoted 2 lines

For my tests, I compared EXT3, XFS, reiser(tails), and reiser(notail). The results are at http://www.mrball.net/file%20creation%20tests.html

Is ext3 using htree?

You know, I don't know the answer to that. I would guess that it's the default compilation options, so if you say that it uses that by default, I'll believe you. I tried grepping the binary but didn't find anything that indicated type of structure.

I found this in namei.c. Dunno if it helps:
* Directory entry file type support and forward compatibility hooks
* for B-tree directories by Theodore Ts'o ([email protected]), 1998

To me that doesn't really tell anything though.

Anyway, I fired off an instance of my test program that created 3 million files and it finished in about 26 minutes. But then I found that I had filled the partition so I shortened the file size a little and restarted it. It was running when I left and I'll analyze the logs tomorrow. BTW, that was on a machine with 5400 RPM 40 GB HD and 128 Megs of RAM (trying to starve the system for resources to get rid of effects of caching and buffering).
- --
Blue skies... Todd Public key: http://www.mrball.net/todd.asc
They dont need to adjust their pricing, they just need to
lobby for new laws to protect their flawed business models.
Oh wait, they just did that. --Dan Hollis
Linux kernel 2.4.22-10mm.2mdk 1 user, load average: 0.02, 0.01, 0.00
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (GNU/Linux)
Comment: http://www.mrball.net/todd.asc

iD8DBQE/oKn4IBT1264ScBURAgDzAJwKxhDmsx4eEsgZk5uQtT3G0yproACfVb4o LlfB7Z4tO3cNQJo4AqOkl6g=
=zWHs
-----END PGP SIGNATURE-----

#14 lore raw
Quoted 7 lines · Todd Lyons
Quoted 1 line · Hans Reiser

Is ext3 using htree?

You know, I don't know the answer to that. I would guess that it's the default compilation options, so if you say that it uses that by default, I'll believe you. I tried grepping the binary but didn't find anything that indicated type of structure.

Unlikely. The htree (also called indexed directory) code is not in any common kernel, although we have been using it extensively for Lustre for many months without problems.

In the past we did some comparisons between ext3+htree and reiserfs for creating 10M files in a single directory and for local filesystems both started at around 25k-30k/s but ext3 started to taper off after about 1M files to under 10k/s (this was on a very large/fast SCSI RAID array) while reiserfs kept pretty steady at 25k/s for the whole 10M files.

Ext3 was a lot worse initially, but I wrote a patch which avoided reading empty inode table blocks from disk while it was allocating inodes. That patch made it into 2.6 I think, but isn't in stock 2.4. What also makes a big difference is the size of your journal, because you can quickly dirty a lot of blocks as you insert filenames into the directory when there are a lot of directory blocks.

Cheers, Andreas
--
Andreas Dilger
http://sourceforge.net/projects/ext2resize/
http://www-mddsp.enel.ucalgary.ca/People/adilger/