On Wed, 2006-07-12 at 01:13 -0700, Cosmo Nova wrote:
> I have some further questions concerning the allocation groups. You mentioned
> that the typical number of allocation group is 65-128, and the minimum size
> of them is 8K blocks or 32MB. But how are the AGs physically located? Does
> it physically mark the JFS volume into (let say) 128 ?sub-partitions?? And
> let new files opened and written to different ?sub-partition??

The volume is logically partitioned into allocation groups (AGs).  The
primary purpose of AGs is to aid in locality.  We attempt to allocate
file inodes in the same AG as the parent directory, and file blocks in
the same AG as the inode or other blocks already allocated to the file.
Additionally, low-level locking of the allocation structures is done
within the AGs when possible to allow concurrent allocations in
different AGs.

Locking the AG's while open files are being written to avoids
fragmentation within the files, but does have an adverse affect on the
locality.  If an AG is "locked", data for a file may be allocated from a
different AG than it's inode is located.

> As I mentioned, the experiment I run on nearly constant file size is
> excellent. How about variable size files? If files of variable size grow in
> the AGs and there are regular deletions, how would JFS deal with the
> potential fragmentation?

I don't have any empirical data, but I would say it depends on the size
of the files.  If there were a lot of small files being allocated and
freed at different intervals, it may leave the free space fragmented
such that new allocations would be piecemeal and you would be more
likely to get fragmented files.

If you were dealing with larger variable sized files, allocations may
still be more fragmented, but probably not as bad.  Instead of having
one large extent, you may have 3 or 4 extents which still define a large
number of blocks each.

> Finally, you mentioned blocks of 4KB is allocated to growing files. Is there
> any internal fragmentation problem to file extents? Will it allocate more
> space than required to avoid external fragmentation?

JFS doesn't allocate any more blocks than are written to, so the space
lost to internal fragmentation will never exceed 4K.

> Thanks!
-- 
David Kleikamp
IBM Linux Technology Center



-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Jfs-discussion mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jfs-discussion

Reply via email to