[Samba] smbd using alot of cpu

Danny Travis danny.travis at exxonmobil.com
Mon Jan 6 23:36:01 GMT 2003


I have an smbd process that is using alot of cpu on HP-UX 11.11 using
Samba 2.2.3a. It looks like the application on the client side is trying
to open and close a ton of files, many of which do not exist. When I do
a trace on the smbd process, I see repeated calls to lstat64 to what
looks like all of the device files on my unix server. Here is a little
bit of the trace. It goes through all of the /dev/dsk/*, /dev/rdsk/*,
/dev/pty/*, so I am pretty sure it is searching all available device
files. Is this an expected behavior? I can't see this on any of the
other smbd processes running on the box.

This is a brief snapshot of a summary of the system calls:

Syscall                     Seconds       Calls      Errors
read                           0.02         391
write                          0.01         130
open                           0.03         198          20
close                          0.01         179
lseek                          0.01         339
utime                          0.00           8
stat                           0.01         170
fcntl                          0.01         282
select                         0.00          87
gettimeofday                   0.00         105
sysconf                        0.00          14
send                           0.00          87
getdents                       0.75        1727
fstat64                        0.00          31
lseek64                        0.00           8
lstat64                        0.48       11809
stat64                         0.09         170          93
statvfs64                      0.00           7
acl                            0.00           8           8
-----                         -----       -----       -----
Total                          1.42       15750         121


sysconf(_SC_OPEN_MAX)
................................................................................................................................
= 10010
stat64("/dev/telnet", 0x7f7f3220)
....................................................................................................................
= 0
stat("/dev/telnet", 0x7f7f3498)
......................................................................................................................
= 0
open("/dev/telnet", O_RDONLY, 0140100)
...............................................................................................................
= 23
fcntl(23, F_SETFD, 1)
................................................................................................................................
= 0
getdents(23, 0x40243dc0, 8192)
.......................................................................................................................
= 48
getdents(23, 0x40243dc0, 8192)
.......................................................................................................................
= 0
close(23)
............................................................................................................................................
= 0
sysconf(_SC_OPEN_MAX)
................................................................................................................................
= 10010
stat64("/dev", 0x7f7f3220)
...........................................................................................................................
= 0
stat("/dev", 0x7f7f3498)
.............................................................................................................................
= 0
open("/dev", O_RDONLY, 0140100)
......................................................................................................................
= 23
fcntl(23, F_SETFD, 1)
................................................................................................................................
= 0
getdents(23, 0x40243dc0, 8192)
.......................................................................................................................
= 6120
lstat64("/dev/config", 0x7f7f3220)
...................................................................................................................
= 0
lstat64("/dev/null", 0x7f7f3220)
.....................................................................................................................
= 0
lstat64("/dev/console", 0x7f7f3220)
..................................................................................................................
= 0
lstat64("/dev/kmem", 0x7f7f3220)
.....................................................................................................................
= 0
lstat64("/dev/mem", 0x7f7f3220)
......................................................................................................................
= 0
lstat64("/dev/rroot", 0x7f7f3220)
....................................................................................................................
= 0
lstat64("/dev/root", 0x7f7f3220)
.....................................................................................................................
= 0
lstat64("/dev/tty", 0x7f7f3220)
......................................................................................................................
= 0
lstat64("/dev/syscon", 0x7f7f3220)
...................................................................................................................
= 0
lstat64("/dev/systty", 0x7f7f3220)
...................................................................................................................
= 0
lstat64("/dev/vg00", 0x7f7f3220)
.....................................................................................................................
= 0
stat("/dev/vg00", 0x7f7f3498)
........................................................................................................................
= 0
open("/dev/vg00", O_RDONLY, 0140100)
.................................................................................................................
= 25
fcntl(25, F_SETFD, 1)
................................................................................................................................
= 0
getdents(25, 0x4025c890, 8192)
.......................................................................................................................
= 408
lstat64("/dev/vg00/group", 0x7f7f3220)
...............................................................................................................
= 0
lstat64("/dev/vg00/lvol1", 0x7f7f3220)
...............................................................................................................
= 0
lstat64("/dev/vg00/rlvol1", 0x7f7f3220)
..............................................................................................................
= 0
lstat64("/dev/vg00/lvol2", 0x7f7f3220)
...............................................................................................................
= 0
lstat64("/dev/vg00/rlvol2", 0x7f7f3220)
..............................................................................................................
= 0
lstat64("/dev/vg00/lvol3", 0x7f7f3220)
...............................................................................................................
= 0
lstat64("/dev/vg00/rlvol3", 0x7f7f3220)
..............................................................................................................
= 0
lstat64("/dev/vg00/lvol4", 0x7f7f3220)
...............................................................................................................
= 0
lstat64("/dev/vg00/rlvol4", 0x7f7f3220)
..............................................................................................................
= 0
lstat64("/dev/vg00/lvol5", 0x7f7f3220)
...............................................................................................................
= 0
lstat64("/dev/vg00/rlvol5", 0x7f7f3220)
..............................................................................................................
= 0
lstat64("/dev/vg00/lvol6", 0x7f7f3220)
...............................................................................................................
= 0
lstat64("/dev/vg00/rlvol6", 0x7f7f3220)
..............................................................................................................
= 0
lstat64("/dev/vg00/lvol7", 0x7f7f3220)
...............................................................................................................
= 0
lstat64("/dev/vg00/rlvol7", 0x7f7f3220)
..............................................................................................................
= 0
getdents(25, 0x4025c890, 8192)
.......................................................................................................................
= 0
close(25) ...................................
-------------- next part --------------
HTML attachment scrubbed and removed


More information about the samba mailing list