Received: with ECARTIS (v1.0.0; list linux-xfs); Fri, 13 Feb 2004 06:49:18 -0800 (PST) Received: from server7.nfra.nl (server7.nfra.nl [192.87.1.57]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i1DEnAKO003526 for ; Fri, 13 Feb 2004 06:49:11 -0800 Received: from wop10.nfra.nl [195.169.63.130] by server7.nfra.nl; Fri, 13 Feb 2004 15:49:39 +0100 Date: Fri, 13 Feb 2004 14:48:42 +0000 (UTC) From: Ramesh K X-X-Sender: kram@wop10.nfra.nl To: linux-xfs@oss.sgi.com Subject: more experiments with realtime subvolumes. In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-archive-position: 2085 X-ecartis-version: Ecartis v1.0.0 Sender: linux-xfs-bounce@oss.sgi.com Errors-to: linux-xfs-bounce@oss.sgi.com X-original-sender: kram@astron.nl Precedence: bulk X-list: linux-xfs Hello: Some more experiements with the realtime subvolumes. Please do pass your comments. Before we start, my system (OS - SuSE 8.1, kernel 2.4.19-64GB-SMP, hardware: Transtec, dual-xeon 2.8 GHz, with 3ware Raid Controller - 8*120GB IDE disks on controller), doesn't seem to have O_DIRECT and O_LARGEFILE options. I'm downloading a newer kernel (2.4.21) from suse website - hopefully that has these options enabled. My harddisk is setup as explained in my previous mail, 100 GB meta-data section, and 800 GB realtime section. More questions on realtime subvolume: When I open a file and try to place it in the realtime section with: struct fsxattr myfsxattr; struct xfs_flock64 file; fd = open("/data/kram/data/file1.dat",O_CREAT|O_RDWR); myfsxattr.fsx_xflags = XFS_XFLAG_REALTIME; ioctl(fd,XFS_IOC_FSSETXATTR,&myfsxattr); file.l_whence = 0; file.l_start = 0; file.l_len=2*1024*1024; ioctl(fd,XFS_IOC_RESVSP,&file); close(fd); And then followed it up with, ioctl(fd,XFS_IOC_FSGETXATTR,&myfsxattr); This call returns fsx_xflags as 0x00 (meaning no realtime, and not preallocated). Is it because of the absence of O_DIRECT in the open call? What are the alignment constraints? The man page of xfsctl explains that "d_mem is the memory alignment requirement of the user's data buffer. d_miniosz specifies block size, minimum I/O request size, and I/O alignment.The size of all I/O requests must be a multiple of this amount and the value of the seek pointer at the time of the I/O request must also be an integer multiple of this amount. d_maxiosz is the maximum I/O request size which can be performed on the file descriptor." Does this mean a write of "char array[1024*1024]" is aligned with 512-byte boundary for the I/O to succeed? Or in other words, is array[1024*1024] d_mem aligned, or do I have to do something special to get it aligned? Thanks for your responses. -Ramesh > > Hi: > Thanks Nathan. I wanted to use ramdisk only to store filenames, and the > actual data in realtime subvolume. Thoguht it'll have better performance. > However I've now repartioned my disk to have two partitions: one of > 100GB and the other of 800GB (/dev/sda1 and /dev/sda2 respectively). I'm using > /dev/sda1 as my regular xfs volume (log plus metadata), and configured /dev/sda2 > as the realtime subvolume. This is the output of mkfs.xfs: > > dop93:~ # mkfs -t xfs -f -d unwritten=0 -r rtdev=/dev/sda2 /dev/sda1 > meta-data=/dev/sda1 isize=256 agcount=25, agsize=1048576 blks > = sectsz=512 > data = bsize=4096 blocks=25601577, imaxpct=25 > = sunit=0 swidth=0 blks, unwritten=0 > naming =version 2 bsize=4096 > log =internal log bsize=4096 blocks=12500, version=1 > = sectsz=512 sunit=0 blks > realtime =/dev/sda2 extsz=65536 blocks=208836967, > rtextents=13052310 > > dop93:~ # mount -t xfs -o rtdev=/dev/sda2 /dev/sda1 /mnt > > It's been good so far. Now how do I determine the amount of free space > in my realtime subvolume? Do I need to have the realtime subvolume on another > device altogether (instead of another partition) to get better performance? > I don't know what version of XFS I'm using (it's not v1.3, but the one > packaged with SuSE 8.1). I have new version ( 2.2.1-28) of xfsprogs though. > In the mean time I also tried to write a 'realtime' file on the realtime > subvolume - but SuSE 8.1 seems to have disabled O_DIRECT and O_LARGEFILE > support. Any clues on that? I'm trying hard to get the realtime subvolumes > working - hopefully it is more deterministic than the regular buffered I/O. Any > info on these lines would be great. Thanks in advance. > > -Ramesh > > > On Thu, Feb 12, 2004 at 03:55:10PM +0000, Ramesh K wrote: > > > > > > Hello, > > > I'm trying to use realtime subvolumes under Linux (SuSE 8.1, running > > > kernel 2.4.19-64GB-SMP (I know it is very old!!) > > > > You should be aware that realtime support is marked experimental > > and may not function correctly. That said, Eric made several > > fixes in this area awhile ago and the last time I tested it, it > > was looking much more stable. > > > > > The hardware: I'm using a 3ware RAID controller, and am using RAID level > > > 0 (all eight 120GByte disks together are seen as one disk of 960 GByte device). > > > Now I want to use this entire 960 GBytes for my realtime data, and want > > > to place metadata on ramdisk. When I try: > > > dop93:> mkfs -t xfs -f -d unwritten=0 -r rtdev=/dev/sda1 /dev/ram1, > > > > > > I get warnings on block size of ramdisk. And when I try to mount the > > > > What is the warning? > > > > > device with: mount -t xfs -o rtdev /dev/sda1 - the call never returns. > > > Am I doing something very gross? Thanks. > > > > That mount line is incorrect, you need to use something like: > > mount -t xfs -o rtdev=/dev/sda1 /dev/ram1 /mnt > > > > It seems odd to be using a ram disk in this way... > > > > cheers. > > > > -- > > Nathan > > > > ************************************************************************** > Ramesh K > (Mo/Tu): Radiosterrenwacht Westerbork, Schattenburg 1, 9433 TA Zwiggelte. > ph: +31-(0)593-598755 fax:+31-(0)593-592486 > (We/Th/Fr): Stitching Astron, Oude Hoogeveensedijk 4, 7991 PD Dwingeloo. > ph: +31-(0)521-595255 fax:+31-(0)521-597332 > ************************************************************************** > > > ************************************************************************** Ramesh K (Mo/Tu): Radiosterrenwacht Westerbork, Schattenburg 1, 9433 TA Zwiggelte. ph: +31-(0)593-598755 fax:+31-(0)593-592486 (We/Th/Fr): Stitching Astron, Oude Hoogeveensedijk 4, 7991 PD Dwingeloo. ph: +31-(0)521-595255 fax:+31-(0)521-597332 **************************************************************************