how are files stored on disk?

Brad Fitzpatrick brad at danga.com
Tue Jun 6 23:33:32 UTC 2006


Chuck,

On Tue, 6 Jun 2006, Chuck Remes wrote:

> I've been reading a bit about mogilefs lately and have a couple of
> questions I'm hoping the current users can answer.
>
> 1. How are files stored on disk and in what directory structure? Do
> they have meaningful names or do they use a unique hash as their name?

/var/mogdata/dev1/0/000/085/0000085026.fid
/var/mogdata/dev1/0/000/085/0000085028.fid
/var/mogdata/dev1/0/000/085/0000085031.fid
/var/mogdata/dev1/0/000/085/0000085034.fid
/var/mogdata/dev1/0/000/085/0000085035.fid
/var/mogdata/dev1/0/000/085/0000085037.fid
/var/mogdata/dev1/0/000/085/0000085038.fid
/var/mogdata/dev1/0/000/085/0000085039.fid
/var/mogdata/dev1/0/000/085/0000085083.fid
/var/mogdata/dev1/0/000/085/0000085046.fid
/var/mogdata/dev1/0/000/085/0000085051.fid
/var/mogdata/dev1/0/000/085/0000085055.fid
/var/mogdata/dev1/0/000/085/0000085056.fid
/var/mogdata/dev1/0/000/085/0000085063.fid
....

> 2. Related to 1, if all files are stored in one (or very few)
> directory(ies), how does the node's file system performance scale?
> I'm interested because I realize many filesystems have trouble with
> directories containing thousands or tens of thousands of files. In
> practice is this a problem afflicting anyone?

MogileFS doesn't trust the filesystem to not suck with large directories,
so it puts max 1,000 files per directory.

> 3. The list archives indicate there are problems with moving files
> larger than 50MB or so. I have an application where some files are
> several hundred MB or even in the low gigabytes. Is this a limitation
> of perlbal or some other mechanism? Would it be hard to swap the HTTP
> PUT mechanism with rsync or another tool better suited for large files?

Such bugs should've been fixed already, but swapping out the replication
mechanism wouldn't be hard either should you need/want it, especially with
the recent code cleanup.

- Brad



More information about the mogilefs mailing list