Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!usc!randvax!segue!bruce From: bruce@segue.segue.com (Bruce Adler) Newsgroups: comp.unix.sysv386 Subject: Re: Disk benchmark (long) Message-ID: <4190@segue.segue.com> Date: 13 Oct 90 21:07:43 GMT References: <1990Oct9.015948.551@jdyx.UUCP> <1990Oct12.231159.23105@ico.isc.com> <1990Oct13.032355.3176@jdyx.UUCP> Reply-To: bruce@segue.segue.com (Bruce Adler) Distribution: usa Organization: Segue Software, Inc. - Santa Monica, CA. +1-213-453-2161 Lines: 51 In article <1990Oct13.032355.3176@jdyx.UUCP> shawn@jdyx.UUCP (Shawn Hayes) writes: > I suspect that the two updates required in Unix explain why OS/2 can >give a performance of up 3 times what AIX 1.2 shows. If anyone knows of a >method of improving file performance or of a Unix that gives increased file >performance over AIX please speak up. I'd really rather work on a Unix >system than OS/2 but disk performance is critical for our application. I know zip about os/2 so forgive me if these questions sound stupid. It sounds like os/2 merely implements buffer cache write through but unix implements true synchronous file updates. If you're appending to a file does os/2 really update the directory entry after every block write? On os/2 if you crash your system before closing the file do you still have all of your data (except perhaps the last block) intact after you reboot (including the proper timestamps on the directory entries)? If not, then the os/2 scheme is only usable when doing updates in place (i.e. you have to pre-allocate the whole file). (This doesn't seem like a "fair" comparison to unix's robust file system with synchronous writes.) If you're dealing with pre-allocated and initialized database files, then on unix you should put your database in a separate partition and use the raw-disk interface. On my machine reading the raw disk (I would have tested writing but I don't have an empty partition) via: dd if=/dev/rdsk/0s4 of=/dev/null bs=1k count=560 takes less than 3 seconds (note: I'm running ISC Unix not AIX). But to use the raw disk interface efficiently you have to do your own buffer cache management (be sure to plock() your process). Now put this all in a separate process add crash recovery, shared memory, record locking, mutual exclusion, threads and/or an RPC mechanism and I believe this is what most commercial, multi-user, high performance database systems do (or should be doing) on unix. If you're doing something that's time critical or so large and complex that you're worried about performance on a 33mhz 386 then it's a waste to try to implement your own database system. Buy a real database system. If all you're really doing is some flat file record manipulation, or what we used to call "data-entry" then you may as well use dos rather than os/2 or unix. So what is it you're really trying to do other than avoid having to work on os/2? :-) -- bruce@segue.com, ism.isc.com!segue!bruce, aero.org!segue!bruce