home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / unix / programm / 5350 < prev    next >
Encoding:
Internet Message Format  |  1992-11-18  |  1.3 KB

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