RE: [Samba] Smbd using too much CPU

2006-04-17 Thread Kim Lindberg
Thanks, this helped! I had shared / and didn't think of proc as something
bad to share.

Kim Lindberg

-Original Message-
From: Volker Lendecke [mailto:[EMAIL PROTECTED] On Behalf Of Volker
Lendecke
Sent: den 17 april 2006 13:02
To: Kim Lindberg
Cc: samba@lists.samba.org
Subject: Re: [Samba] Smbd using too much CPU

On Mon, Apr 17, 2006 at 12:46:04PM +0200, Kim Lindberg wrote:
> I recently got the problem that my smbd process takes up a lot of CPU
(about
> 60%). It's running this high even if I don't access the server through my
> samba clients. I have tried restarting samba, rebooting the computer and I
> have been looking at several logs but I can't see what's wrong. It never
> seems to relax. I need to fix this as fast as possible because my CPU fan
is
> running so high I can't even think.

Don't share /proc via samba.

Volker

-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


Re: [Samba] Smbd using too much CPU

2006-04-17 Thread Volker Lendecke
On Mon, Apr 17, 2006 at 12:46:04PM +0200, Kim Lindberg wrote:
> I recently got the problem that my smbd process takes up a lot of CPU (about
> 60%). It's running this high even if I don't access the server through my
> samba clients. I have tried restarting samba, rebooting the computer and I
> have been looking at several logs but I can't see what's wrong. It never
> seems to relax. I need to fix this as fast as possible because my CPU fan is
> running so high I can't even think.

Don't share /proc via samba.

Volker


pgpdDfPssAsCk.pgp
Description: PGP signature
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba

[Samba] Smbd using too much CPU

2006-04-17 Thread Kim Lindberg
I recently got the problem that my smbd process takes up a lot of CPU (about
60%). It's running this high even if I don't access the server through my
samba clients. I have tried restarting samba, rebooting the computer and I
have been looking at several logs but I can't see what's wrong. It never
seems to relax. I need to fix this as fast as possible because my CPU fan is
running so high I can't even think.

 

This is an extract from top:




[EMAIL PROTECTED] /]# top

PID USER  PR  NI  VIRT  RES  SHR S %CPU %MEMTIME+  COMMAND

13320 root  16   0  190m 181m 2400 R 77.2 36.1  43:36.14 smbd

 

 

 

This is the result from running strace for about five seconds:




 

 [EMAIL PROTECTED] /]# strace -p 13320 -cfqrT

% time seconds  usecs/call callserrors syscall

-- --- --- - - 

 75.610.085973   6 13814  1740 stat64

  9.710.011036   7  1560   select

  5.660.006436   4  1561   write

  4.300.004889   6   847   open

  1.930.002193   1  1774   getdents64

  1.520.001728   1  3120   read

  1.100.001249   1  2231   fcntl64

  0.090.000107   0   847   close

  0.090.98   0   847   fstat64

  0.000.00   0 8   time

  0.000.00   0 6   lseek

  0.000.00   0  1560   gettimeofday

  0.000.00   025   mremap

-- --- --- - - 

100.000.113709 28200  1740 total

 

 

 

 

Here's an extract from strace -p 13320 -f. I don't understand anything from
it.




gettimeofday({1145270319, 463254}, NULL) = 0

stat64("proc/self/task/13320/cwd/proc/self/task/13320/cwd/proc/self/task/133
20/cwd/proc/self/task/13320/cwd/proc/self/task/13320/cwd/proc/self/task/1332
0/cwd/proc/self/task/13320/cwd/proc/self/task/13320/cwd/proc/2/root/proc/6/c
wd/proc/13123/fd", {st_mode=S_IFDIR|0500, st_size=0, ...}) = 0

fcntl64(13, F_SETLKW64, {type=F_WRLCK, whence=SEEK_SET, start=672, len=1},
0xbfec6344) = 0

fcntl64(13, F_SETLKW64, {type=F_UNLCK, whence=SEEK_SET, start=672, len=1},
0xbfec6284) = 0

write(23, "\0\0\0d\377SMB2\0\0\0\0\210A\310\0\0\0\0\0\0\0\0\0\0\0"..., 104)
= 104

select(24, [5 23], NULL, NULL, {60, 0}) = 1 (in [23], left {60, 0})

read(23, "\0\0\0020", 4)= 4

read(23, "\377SMB2\0\0\0\0\30\7\310\0\0\0\0\0\0\0\0\0\0\0\0\2\0\204"...,
560) = 560

gettimeofday({1145270319, 495271}, NULL) = 0

stat64("proc/self/task/13320/cwd/proc/self/task/13320/cwd/proc/self/task/133
20/cwd/proc/self/task/13320/cwd/proc/self/task/13320/cwd/proc/self/task/1332
0/cwd/proc/self/task/13320/cwd/proc/self/task/13320/cwd/proc/2/root/proc/6/c
wd/proc/13123/fd", {st_mode=S_IFDIR|0500, st_size=0, ...}) = 0

stat64("proc/self/task/13320/cwd/proc/self/task/13320/cwd/proc/self/task/133
20/cwd/proc/self/task/13320/cwd/proc/self/task/13320/cwd/proc/self/task/1332
0/cwd/proc/self/task/13320/cwd/proc/self/task/13320/cwd/proc/2/root/proc/6/c
wd/proc/13123/fd/*", 0xbfec57d0) = -1 ENOENT (No such file or directory)

stat64("proc/self/task/13320/cwd/proc/self/task/13320/cwd/proc/self/task/133
20/cwd/proc/self/task/13320/cwd/proc/self/task/13320/cwd/proc/self/task/1332
0/cwd/proc/self/task/13320/cwd/proc/self/task/13320/cwd/proc/2/root/proc/6/c
wd/proc/13123/fd/*", 0xbfec57d0) = -1 ENOENT (No such file or directory)

open("proc/self/task/13320/cwd/proc/self/task/13320/cwd/proc/self/task/13320
/cwd/proc/self/task/13320/cwd/proc/self/task/13320/cwd/proc/self/task/13320/
cwd/proc/self/task/13320/cwd/proc/self/task/13320/cwd/proc/2/root/proc/6/cwd
/proc/13123/fd", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY) = 24

fstat64(24, {st_mode=S_IFDIR|0500, st_size=0, ...}) = 0

fcntl64(24, F_SETFD, FD_CLOEXEC)= 0

stat64("proc/self/task/13320/cwd/proc/self/task/13320/cwd/proc/self/task/133
20/cwd/proc/self/task/13320/cwd/proc/self/task/13320/cwd/proc/self/task/1332
0/cwd/proc/self/task/13320/cwd/proc/self/task/13320/cwd/proc/2/root/proc/6/c
wd/proc/13123/fd/.", {st_mode=S_IFDIR|0500, st_size=0, ...}) = 0

 

 

 

The samba logs doesn't tell me anything and neither does /var/log/messages.
What is going on?

 

The computer is a ~2GHz Intel, 512MB ram, Fedora Core 5.

 

 

Kim Lindberg

 

-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba