lkml.org 
[lkml]   [1999]   [May]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Quota file format proposal
> >> Isn't it possible to code the uid/gid in the struct too, this way
> >> we dont have to write a 1GB(?) file for 2 users, one at UID0 and
> >> one at UID 131072... Since this struct is read into memory-structs
> >> some small handeling shouldn't really matter in performance...
> > We won't write 1GB of data. We take advantage of sparse files so there is almost no
> > difference between storage of UIDS 1000, 1010 and 1000, 10000...
>
> Wouldn't it be a good idea at this point to switch to a more flexible
> format for the quota file? You are correct with the above remarks as
> long as userids stay 2 bytes long. For 4 byte userids we are above the
> limit for the current maximum file size of ext2 with respect to the
> quota file. What about using a hash table instead?
I know about it (I think I already mentioned this problem...). We have to consider following:

* Yes, we hit 2GB limit but this limit is only on 32-bit arch and in 2.3 we hopefuly
remove it completely. Anyway we still have ~25 bits to use :-).

* We don't have good estimation of how large should hash table be and resizing it is really pain.

* Lookup will slow down as we will have to go through hash chain which is written on the disk. We
cache dquots in memory but...

* Need some space for hash table (but this is of no interest).

I thought about some trees but without reasonable result...
My final conclusion is that some more complex structure is probably not a win. Maybe when I'll make
thinks work with simple table I'll try to implement some more sophisticated structure. We have development
phase so we can afford experiments ;-)

Honza


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:51    [W:0.081 / U:0.060 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site