From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,de25bd1e07d05c12 X-Google-Attributes: gidfee84,public X-Google-Thread: 1014db,de25bd1e07d05c12 X-Google-Attributes: gid1014db,public X-Google-Thread: f678f,de25bd1e07d05c12 X-Google-Attributes: gidf678f,public From: alan@nabeth.cxo.dec.com (Alan Rollow - Dr. File System's Home for Wayward Inodes.) Subject: Re: Digital unix slow as a wet week? Date: 1996/11/12 Message-ID: <56b112$4ti@nntpd2.cxo.dec.com>#1/1 X-Deja-AN: 196082879 distribution: world references: <569118$at9@status.gen.nz> organization: Digital Equipment Corporation reply-to: alan@nabeth.cxo.dec.com (Alan Rollow - Dr. File System's Home for Wayward Inodes.) newsgroups: comp.unix.osf.misc,comp.unix.osf.osf1,comp.lang.c In article <569118$at9@status.gen.nz>, netwin@world.std.com (Chris Pugmire) writes: >I have a 'c' program, that writes a lot of files to a lot of >directories, using 'open', 'close' 'write' calls. > >On intel linux it runs 6 times faster than on digital unix v4. It would help to know what kind of system and I/O subsystem. Digital UNIX is supported on many older Alpha systems that are slower than newer Intel based systems. >Can anyone tell me why, it appears that digital unix is blocking the >process while it writes the files but linux does not. I don't have access to source to verify, but I think Digital UNIX does a synchronous flush on close. If the files are small the open/close time will easily dominate the I/O time. If Linux doesn't think enough of your data to ensure it on the disk after the file is closed, then it certainly be faster. Another possibility is how data writes are scheduled and retired. On UFS (a Berkeley Fast File System implementation), writes which end on a file system block boundary are immediately scheduled for writing. The I/O is still asynchronous, once the data is copied into the kernel buffer. The affect is that data trickles out to the disk in a steady stream (or flood). The kernel variable delay_wbuffers controls this. If set, all writes will be delayed until a sync or the cache needs to be flushed to make room for other data. Less likely, but possible, is that the disks on the Intel system have a write-cache enabled at the disk, which is making the writes faster. Digital doesn't ship any of its disks with the write cache enabled, since it places the data to be stored on them at risk. But if you want to run the risk you may be able to enable the feature through scu(8). Finally, the Digital UNIX does support the option of mounting file system for synchronous writes. It may worth checking to see how the file system is mounted. >ChrisP, netwin@world.std.com -- Alan Rollow alan@nabeth.cxo.dec.com