> A related question about logdev sizes ...
>
> I've noticed that mkfs.xfs refuses to make a logdev bigger than
> 128M. Have anyone done any work on upping this limit?
In general XFS logs are fairly compact - we only log deltas to buffers not
whole buffers, and if something is changed a second time whilst there is
still a copy in the log we relog and free the old space. so once you get
to the state where you are doing sufficient work to fill a big log you are
doing so much disk I/O in other places it does not matter. The other
issue with bigger logs is mount gets slower - there is a binary chop
search of the log looking for its head and tail at mount time. Clearly,
more time is required for recovery too - probably not a huge issue with a
ram disk.
An issue with internal log size is it must fit within an allocation group
in the filesystem (an allocation group is an internal division of the
disk space into a self managed chunk of space) we usually have 8 on a
small filesystem, this is the limiting factor there. Once the log is
external or the allocation groups big (4G max) this goes away.
The real answer about growing the max size is I cannot think of a field
size which will be exceeded by growing beyond this, but I have my suspicions
you will hit something. I did a quick test with a 256M log and it appeared
to function - I crashed it and recovery ran fine. No guarantees, but try this
patch and rebuild mkfs (do a make clean, it does not appear to do header file
dependencies):
===========================================================================
Index: cmd/xfsprogs/include/xfs_fs.h
===========================================================================
--- /usr/tmp/TmpDir.22316-0/cmd/xfsprogs/include/xfs_fs.h_1.7 Fri Jul 27
06:56:45 2001
+++ cmd/xfsprogs/include/xfs_fs.h Fri Jul 27 06:56:26 2001
@@ -231,9 +231,9 @@
*/
#define XFS_MIN_AG_BLOCKS 64
#define XFS_MIN_LOG_BLOCKS 512
-#define XFS_MAX_LOG_BLOCKS (64 * 1024)
+#define XFS_MAX_LOG_BLOCKS (256 * 1024)
#define XFS_MIN_LOG_BYTES (256 * 1024)
-#define XFS_MAX_LOG_BYTES (128 * 1024 * 1024)
+#define XFS_MAX_LOG_BYTES (1024 * 1024 * 1024)
/*
* XFS_IOC_FSGROWFSDATA
I have to think about this somemore and ask around, I may be missing
something.
>
> I'd like to put the logdev on a 1G ram card so that I can do really
> large netbench runs without hitting the real disks. I'm testing at the
> moment with the logdev on a ramdisk (see
> http://samba.org/ftp/unpacked/junkcode/trd/) but the 130M limit means
> those pesky disk lights come on with even quite small runs.
All I can say is you lucky dog!
>
> also, is there any work being done to use the same logdev for multiple
> filesystems? Having to know in advance how to split up a valuable nv
> ram area over lots of filsystems can be tricky.
There is no way to share a log between filesystems, there is no identification
in the log records as to who they belong to. I did work out how to edit
a filesystem to put multiple logs into one partition, but I suspect your
ram device could just be partitioned. Here for the record is a pointer to
how to move a log - this should really be done in a utility program:
http://oss.sgi.com/projects/xfs/mail_archive/0107/msg00564.html
At the end of this there is a comment about how to make multiple logs
on one device. I do not anticipate being able to share a single log
across filesystems, Stephen Tweedie architected this in from the start
for ext3, in XFS it was never even thought about.
Steve
|