Solaris lseek when reading shape files
Matthew Holger
mholger at OPTERA.NET
Fri Apr 8 06:02:47 PDT 2005
On Thu, Apr 07, 2005 at 05:15:41PM -0400, Frank Warmerdam wrote:
> Don,
>
> Looking at the pattern of seeks and reads, it would seem that stuff
> is getting read in 8K chunks which I would presume is being done by
> the C stdio library in response to lots of little reads in mapserver.
> Similarly it would seem that the low level seeks are being generated
> by the stdio library.
It's worse than that. Solaris, by default, uses an 8k-inode. Linux used to
use 1k or 2k inodes in e2fs, but I think they went to 32k inodes as of late
(been a long, long time). This would easily account for the increased
read-time under Linux.
trussing (and subsequently dtracing) mapserver on my own Solaris box shows
the exact same behavior, which is something I'd been meaning to track down
for awhile now, but just hadn't had the impoetus to do until now. :)
The read/seek limit is going to be a factor of the disk block size in this
case, so the solution here is to crank up your inode size. The downside to
using a larger inode size is that smaller files may end up taking up MORE
disk space, but not necessarily (this really becomes a discussion of Unix
file storage techniques, which is beyond the scope of me, or this list, I'm
afraid :)
Cheers!
-Matt.
--
_
Matthew Holger (mholger at optera.net) || ASCII ribbon campaign ( )
Unix Systems Administrator || against HTML Email X
http://www.Optera.NET/ :: m:651.271.3248 || http://arc.pasp.de/ / \
More information about the MapServer-users
mailing list