home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!ub!acsu.buffalo.edu!sivap-s
- From: sivap-s@acsu.buffalo.edu (Suresh .S)
- Newsgroups: comp.unix.programmer
- Subject: Re: disk buffer size, portable record locking, cabbages, and kings
- Message-ID: <BxyAIt.1rD@acsu.buffalo.edu>
- Date: 19 Nov 92 06:40:04 GMT
- References: <jfoster.720986597@mcl>
- Sender: nntp@acsu.buffalo.edu
- Organization: UB
- Lines: 16
- Nntp-Posting-Host: talos.cs.buffalo.edu
- X-Newsreader: TIN [version 1.1 PL6]
-
- Joe Foster of Borg (jfoster@mcl.ucsb.edu) wrote:
- : 1) Where is the best place to look for the disk block size? Calls
- : to read() and write() seem to be faster when the size of the
- : buffers passed to them are the same as the blocks in the kernel
- : disk cache. Also, passing arbitrarily-sized buffers to reads and
- : writes to raw disk devices seems to bomb. Again, the buffers seem
- : to need to be the same size as the blocks in the disk cache.
- : What .h file is best to look at? Is the #define fairly standard?
-
- A call to statfs(2) or stat(2) will give the best size for file I/O.
- In statfs it is f_bsize and in stat() it is st_blksize.
-
- --
- Suresh Sivaprakasam
- Department of Computer Science, SUNY Buffalo, Amherst, NY - 14260-0001
- Internet :sivap-s@cs.Buffalo.EDU Bitnet : sivap-s@SUNYBCS.BITNET
-