[CentOS] Perfomance tuning for NIS client

Fri Oct 12 21:25:54 UTC 2007
joseph blase <joseph.mailboxlist at gmail.com>

On 10/13/07, Garrick Staples <garrick at usc.edu> wrote:

> On Sat, Oct 13, 2007 at 03:45:14AM +0800, joseph blase alleged:
> > [root at amsdc2-n-s04taw root]# time id userid
> > uid=36923(userid) gid=36923(u_036923) groups=36923(u_036923)
> >
> > real    0m10.509s
> > user    0m0.030s
> > sys     0m0.090s







> Start with 'strace id userid' to see where it is stalling.  Maybe you'll
> find a
> bad PTR lookup or something.


Thanks, seems strace show something use but can't parse it.

[root at linux]# strace -c -e trace=network -T id userid
uid=36923(userid) gid=36923(u_036923) groups=36923(u_036923)
% time     seconds  usecs/call     calls    errors syscall
------ ----------- ----------- --------- --------- ----------------
 26.19    0.879992          86     10184        72 bind
 23.81    0.800000      200000         4           connect
 17.26    0.579985          57     10112           recvfrom
 12.50    0.419998          42     10112           sendto
 12.20    0.409995          41     10112           setsockopt
  8.04    0.269990          27     10116           socket
------ ----------- ----------- --------- --------- ----------------
100.00    3.359960                 50640        72 total
[root at linux]# strace -c  -T id userid
uid=36923(myjtaf) gid=36923(u_036923) groups=36923(u_036923)
% time     seconds  usecs/call     calls    errors syscall
------ ----------- ----------- --------- --------- ----------------
 28.37    5.659654         560     10112           poll
  4.36    0.869994          85     10184        72 bind
  4.21    0.839992          83     10114           readv
  4.06    0.809998          80     10131         7 open
  4.06    0.809974          80     10112           setsockopt
  4.01    0.800000      200000         4           mprotect
  4.01    0.800000      200000         4           brk
  4.01    0.800000      200000         4           writev
  4.01    0.800000      200000         4           connect
  3.91    0.779980          77     10112           sendto
  3.51    0.700000      700000         1           write
  3.51    0.700000       33333        21           mmap
  3.51    0.700000      700000         1           getpid
  3.51    0.700000      700000         1           arch_prctl
  3.01    0.600000       33333        18           read
  3.01    0.600000       75000         8           munmap
  2.76    0.549979          54     10116           fcntl
  2.66    0.529992          52     10112           ioctl
  2.21    0.439998          44     10112           recvfrom
  2.01    0.400000      200000         2           lseek
  2.01    0.400000      200000         2           uname
  1.40    0.279993          28     10116           socket
  1.40    0.279977          14     20240           close
  0.50    0.100000        7692        13           fstat
------ ----------- ----------- --------- --------- ----------------
100.00   19.949531                121544        79 total

It seem that bind to something takes too much time.



> You can also determine if the stall is in NIS code with 'ypmatch userid
> passwd'.



Normal here.

If nscd is running, does killing it make a difference?


It worsen it.




> Any selinux violations in /var/log/messages?



None, as no selinux enabled.



with trace=bind output, please shed light what's happening in this?


[root at linux root]# strace  -e trace=bind -T id userid
bind(5, {sa_family=AF_INET, sin_port=htons(682),
sin_addr=inet_addr("0.0.0.0")},
16) = 0 <0.000000>
bind(5, {sa_family=AF_INET, sin_port=htons(683),
sin_addr=inet_addr("0.0.0.0")},
16) = 0 <0.000000>
bind(5, {sa_family=AF_INET, sin_port=htons(684),
sin_addr=inet_addr("0.0.0.0")},
16) = 0 <0.000000>
bind(5, {sa_family=AF_INET, sin_port=htons(685),
sin_addr=inet_addr("0.0.0.0")},
16) = 0 <0.000000>
bind(5, {sa_family=AF_INET, sin_port=htons(686),
sin_addr=inet_addr("0.0.0.0")},
16) = 0 <0.000000>
bind(5, {sa_family=AF_INET, sin_port=htons(687),
sin_addr=inet_addr("0.0.0.0")},
16) = 0 <0.000000>
bind(5, {sa_family=AF_INET, sin_port=htons(688),
sin_addr=inet_addr("0.0.0.0")},
16) = 0 <0.000000>
bind(5, {sa_family=AF_INET, sin_port=htons(689),
sin_addr=inet_addr("0.0.0.0")},
16) = 0 <0.000000>
bind(5, {sa_family=AF_INET, sin_port=htons(690),
sin_addr=inet_addr("0.0.0.0")},
16) = 0 <0.000000>
bind(5, {sa_family=AF_INET, sin_port=htons(691),
sin_addr=inet_addr("0.0.0.0")},
16) = 0 <0.000000>

<<< ---------------Very Long same
messages------------------------------------------>>

bind(5, {sa_family=AF_INET, sin_port=htons(672),
sin_addr=inet_addr("0.0.0.0")},
16) = 0 <0.000000>
bind(5, {sa_family=AF_INET, sin_port=htons(673),
sin_addr=inet_addr("0.0.0.0")},
16) = -1 EADDRINUSE (Address already in use) <0.000000>
bind(5, {sa_family=AF_INET, sin_port=htons(674),
sin_addr=inet_addr("0.0.0.0")},
16) = 0 <0.000000>
bind(5, {sa_family=AF_INET, sin_port=htons(675),
sin_addr=inet_addr("0.0.0.0")},
16) = 0 <0.000000>
bind(5, {sa_family=AF_INET, sin_port=htons(676),
sin_addr=inet_addr("0.0.0.0")},
16) = 0 <0.000000>
bind(5, {sa_family=AF_INET, sin_port=htons(677),
sin_addr=inet_addr("0.0.0.0")},
16) = 0 <0.000000>
bind(5, {sa_family=AF_INET, sin_port=htons(678),
sin_addr=inet_addr("0.0.0.0")},
16) = 0 <0.000000>
bind(5, {sa_family=AF_INET, sin_port=htons(679),
sin_addr=inet_addr("0.0.0.0")},
16) = 0 <0.000000>
bind(5, {sa_family=AF_INET, sin_port=htons(680),
sin_addr=inet_addr("0.0.0.0")},
16) = 0 <0.000000>
bind(5, {sa_family=AF_INET, sin_port=htons(681),
sin_addr=inet_addr("0.0.0.0")},
16) = 0 <0.000000>
bind(5, {sa_family=AF_INET, sin_port=htons(682),
sin_addr=inet_addr("0.0.0.0")},
16) = 0 <0.000000>
bind(5, {sa_family=AF_INET, sin_port=htons(683),
sin_addr=inet_addr("0.0.0.0")},
16) = 0 <0.000000>
bind(5, {sa_family=AF_INET, sin_port=htons(684),
sin_addr=inet_addr("0.0.0.0")},
16) = 0 <0.000000>
bind(5, {sa_family=AF_INET, sin_port=htons(685),
sin_addr=inet_addr("0.0.0.0")},
16) = 0 <0.000000>
bind(5, {sa_family=AF_INET, sin_port=htons(686),
sin_addr=inet_addr("0.0.0.0")},
16) = 0 <0.000000>
bind(5, {sa_family=AF_INET, sin_port=htons(687),
sin_addr=inet_addr("0.0.0.0")},
16) = 0 <0.000000>
bind(5, {sa_family=AF_INET, sin_port=htons(688),
sin_addr=inet_addr("0.0.0.0")},
16) = 0 <0.000000>
bind(5, {sa_family=AF_INET, sin_port=htons(689),
sin_addr=inet_addr("0.0.0.0")},
16) = 0 <0.000000>
uid=36923(userid) gid=36923(u_036923) groups=36923(u_036923)
Joseph


> _______________________________________________
> CentOS mailing list
> CentOS at centos.org
> http://lists.centos.org/mailman/listinfo/centos
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.centos.org/pipermail/centos/attachments/20071013/3141e0a9/attachment-0005.html>