netstat long startup time
Michiel Boland
boland37 at xs4all.nl
Sun Jul 17 15:12:54 UTC 2011
Hi. The netstat command is very slow on -CURRENT sparc64. (Blade 100.) It first
spends 1.5 seconds trying to resolve kernel symbols in kldsym(). A fragment of
ktrace output
...
37251 netstat 0.000029 CALL getpid
37251 netstat 0.000017 RET getpid 37251/0x9183
37251 netstat 0.000037 CALL kldsym(0,KLDSYM_LOOKUP,0x7fdffffc798)
37251 netstat 0.007638 RET kldsym -1 errno 2 No such file or directory
37251 netstat 0.000279 CALL kldsym(0,KLDSYM_LOOKUP,0x7fdffffc798)
37251 netstat 0.007642 RET kldsym -1 errno 2 No such file or directory
37251 netstat 0.000147 CALL kldsym(0,KLDSYM_LOOKUP,0x7fdffffc798)
37251 netstat 0.007231 RET kldsym -1 errno 2 No such file or directory
37251 netstat 0.000126 CALL kldsym(0,KLDSYM_LOOKUP,0x7fdffffc798)
37251 netstat 0.000041 RET kldsym 0
37251 netstat 0.000033 CALL kldsym(0,KLDSYM_LOOKUP,0x7fdffffc798)
37251 netstat 0.003068 RET kldsym 0
37251 netstat 0.000782 CALL kldsym(0,KLDSYM_LOOKUP,0x7fdffffc798)
37251 netstat 0.000050 RET kldsym 0
37251 netstat 0.000032 CALL kldsym(0,KLDSYM_LOOKUP,0x7fdffffc798)
37251 netstat 0.007160 RET kldsym -1 errno 2 No such file or directory
37251 netstat 0.000229 CALL kldsym(0,KLDSYM_LOOKUP,0x7fdffffc798)
37251 netstat 0.007279 RET kldsym -1 errno 2 No such file or directory
37251 netstat 0.000128 CALL kldsym(0,KLDSYM_LOOKUP,0x7fdffffc798)
37251 netstat 0.007242 RET kldsym -1 errno 2 No such file or directory
37251 netstat 0.000160 CALL kldsym(0,KLDSYM_LOOKUP,0x7fdffffdc78)
37251 netstat 0.000045 RET kldsym 0
(repeated about 50 times)
note the extraordinary amount of time spent in the kldym system call
Is there any way to speed this up? (Apart from rewriting the netstat program so
that it does not try to resolve symbol names that are then never used.)
Cheers
Michiel
More information about the freebsd-sparc64
mailing list