Solaris lseek when reading shape files

Stephen Woodbridge woodbri at SWOODBRIDGE.COM
Thu Apr 7 13:45:26 PDT 2005


Don,

Looks like you don't have a /mapdata/tiger/IL/Cook/tgr17031placecu.qix
file. I'm I read the log correctly? This could/would account for a major
perfomance issue.

-Steve

Don Drake wrote:
> I'm using street-level data broken out by counties (tileindexed) and
> I'm running into some performance problems on Solaris.  We have this
> working on Linux, similar maps take 5 seconds max and on Solaris they
> take 45 seconds.
>
> I've trussed the web server and found the PHP/Mapscript process doing
> the following:
> 14455:  272.2223
> open("/mapdata/tiger/IL/Cook/tgr17031placecu.shp", O_RDONLY) = 8
> 14455:  272.2224
> open("/mapdata/tiger/IL/Cook/tgr17031placecu.shx", O_RDONLY) = 9
> 14455:  272.2225        fstat64(8, 0xFFBF5AA8)                          = 0
> 14455:  272.2225        fstat64(8, 0xFFBF5950)                          = 0
> 14455:  272.2225        ioctl(8, TCGETA, 0xFFBF5A34)
>  Err#25 ENOTTY
> 14455:  272.2226        read(8, "\0\0 '\n\0\0\0\0\0\0\0\0".., 8192)     = 8192
> 14455:  272.2227        fstat64(9, 0xFFBF5AA8)                          = 0
> 14455:  272.2227        fstat64(9, 0xFFBF5950)                          = 0
> 14455:  272.2228        ioctl(9, TCGETA, 0xFFBF5A34)
>  Err#25 ENOTTY
> 14455:  272.2228        read(9, "\0\0 '\n\0\0\0\0\0\0\0\0".., 8192)     = 1180
> 14455:  272.2229
> open("/mapdata/tiger/IL/Cook/tgr17031placecu.dbf", O_RDONLY) = 10
> 14455:  272.2230        fstat64(10, 0xFFBF5AB8)                         = 0
> 14455:  272.2231        fstat64(10, 0xFFBF5960)                         = 0
> 14455:  272.2231        ioctl(10, TCGETA, 0xFFBF5A44)
>  Err#25 ENOTTY
> 14455:  272.2232        read(10, "03 h05\t87\0\0\0 !01 U\0".., 8192)    = 8192
> 14455:  272.2232        lseek(10, 32, SEEK_SET)                         = 32
> 14455:  272.2233        read(10, " G I S T _ I D\0\0\012 N".., 8192)    = 8192
> 14455:  272.2234
> open("/mapdata/tiger/IL/Cook/tgr17031placecu.qix", O_RDONLY) Err#2
> ENOENT
> 14455:  272.2235        lseek(8, 112, SEEK_SET)                         = 112
> 14455:  272.2235        read(8, "C2BD 2 oD5F1 UC0AB \A8FC".., 8192)     = 8192
> 14455:  272.2236        lseek(8, 3256, SEEK_SET)                        = 3256
> 14455:  272.2237        read(8, "03 < iE1B201 VC089 w80 '".., 8192)     = 8192
> 14455:  272.2237        lseek(8, 13872, SEEK_SET)                       = 13872
> 14455:  272.2238        read(8, "828E VB5A4\t VC0CAC3 BAD".., 8192)     = 8192
> 14455:  272.2239        lseek(8, 17652, SEEK_SET)                       = 17652
> 14455:  272.2240        read(8, "CBA0DAE0 D0F VC0 { K 9 _".., 8192)     = 8192
> 14455:  272.2240        lseek(8, 24028, SEEK_SET)                       = 24028
> 14455:  272.2241        read(8, " 317B8 <D610 VC0 RB7B3AF".., 8192)     = 8192
> 14455:  272.2242        lseek(8, 28788, SEEK_SET)                       = 28788
> 14455:  272.2242        read(8, "BEF7 7 hAFF6 UC0 `AB048B".., 8192)     = 8192
> 14455:  272.2243        lseek(8, 31872, SEEK_SET)                       = 31872
> 14455:  272.2244        read(8, "B8ACC2 f80F9 UC0B2D2A414".., 8192)     = 8192
> 14455:  272.2244        lseek(8, 33384, SEEK_SET)                       = 33384
> 14455:  272.2245        read(8, " M ID6E1E8FA UC0 ` t y s".., 8192)     = 8192
> 14455:  272.2245        lseek(8, 34116, SEEK_SET)                       = 34116
> 14455:  272.2246        read(8, " 507\bE6E8FA UC0A4 6 q r".., 8192)     = 8192
> 14455:  272.2247        lseek(8, 35596, SEEK_SET)                       = 35596
> 14455:  272.2247        read(8, " . r O W wF3 UC0AB ]13D2".., 8192)     = 8192
>
> The seeks continue on for about a million more lines (seriously) and
> this takes forever.
>
> This is a really inefficient way to scan a file, what can I do?
>
> I"m running Mapserver 4.2.5 on Solaris 9.
>
> -Don
> --
> Donald Drake
> President
> Drake Consulting
> http://www.drakeconsult.com/
> http://www.MailLaunder.com/
> http://www.mobilemeridian.com/
> 312-560-1574
>



More information about the MapServer-users mailing list