General advice re anything "slow" (was: Samba 4.0.9 smbd slow)

David Collier-Brown davec-b at rogers.com
Wed Sep 25 06:35:55 MDT 2013


Something you can do fairly quickly is to do an ltrace -c profile of the
program while it is running quickly, then another when it's slow. This
tends to *exclude* possibilities, in the case of ltrace slow library
calls. You can do the same with strace to find slow system calls.

Run ltrace -c -f -p <pid> -o <filename>, let it run for a fixed amount
of time and then send it a ^c. It will dump a profile to <filename>.

If you want to profile a specific library, add --library <filename>

Compare the two, and watch for both large absolute times and relative
differences in time between fast and slow samples.

This tends to spot things that "should never happen", such as an I/O
call that takes insanely long periods of time because the service it was
reading data from had been misconfigured.

When something is slow, profiles are your friend. One of the core team
may be able to make concrete suggestions re application profiling, other
than "do some" (;-)).

--dave (one of the apptrace(8) authors) c-b


On 09/25/2013 07:45 AM, Juan Pablo Lorier wrote:
> Hi Richard,
>
> I'll take a look at the resources at the time the problem starts, but I
> can tell you that either CPU or RAM are not being fully used.
> CPU is over 90% idle all the time and ram is less than 4GB out of 12GB
> for the hole system and I don't remember seen a notifying increase in
> any of the smbd instances.
> By slow down is that a user that is already logged to a share, just to
> change folder may take over a minute, yesterday, rendering a file took
> over 8 minutes to start and then it worked as usually. All this
> "latency" disappears when I restart smbd.
> I didn't compile from git as I'm trying to get "stable" releases for
> this matter though I know it's not really stable.
> Regards,
>
>
> On 24/09/13 19:29, Richard Sharpe wrote:
>> On Tue, Sep 24, 2013 at 9:07 AM, Juan Pablo Lorier <jplorier at gmail.com> wrote:
>>> Hi,
>>>
>>> This is my third post on this matter with only one kind reply that sadly
>>> was not helpful. I need help with this problem or at least an official
>>> reply on samba 4 not being a production level server solution.
>>> I have installed samba 4.0.9 from sernet, server on centos 6.4 and after
>>> a couple of days I need to restart smbd as it starts to slow down A LOT
>>> share access. This happens time after time and I see nothing in the logs
>>> pointing to anythins usable.
>>> Security is local (no winbind), anything I can post you to help on this,
>>> just ask.
>> Hmmm, this is becoming of interest to me but I do not have time to
>> look at it for a while yet.
>>
>> However, do you see the smbds consuming lots of CPU when this happens?
>>
>> What does top show when this happens? How much memory are the smbds consuming?
>>
>> When you say slows down share access, what is slowing down?
>>
>> Authentication? Connecting to shares? Existing users who are already connected?
>>
str

-- 
David Collier-Brown,         | Always do right. This will gratify
System Programmer and Author | some people and astonish the rest
davecb at spamcop.net           |                      -- Mark Twain
(416) 223-8968



More information about the samba-technical mailing list