Bug 8395 - optimize serverid_exists() for Solaris.
Summary: optimize serverid_exists() for Solaris.
Status: RESOLVED FIXED
Alias: None
Product: Samba 3.6
Classification: Unclassified
Component: File services (show other bugs)
Version: unspecified
Hardware: All All
: P5 normal
Target Milestone: ---
Assignee: Karolin Seeger
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks: 8399
  Show dependency treegraph
 
Reported: 2011-08-22 19:46 UTC by Jeremy Allison
Modified: 2011-08-25 16:35 UTC (History)
0 users

See Also:


Attachments
git-am fix for 3.6.1 (1.14 KB, patch)
2011-08-22 19:48 UTC, Jeremy Allison
vl: review+
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jeremy Allison 2011-08-22 19:46:03 UTC
Ira Cooper <ira@wakeful.net> reports:

Problem: Samba is being existential.  It is wondering if it exists far too
much, especially when it can just poke itself and see.

As far as how often it does this check: I've seen it be over 50% of the calls
to this function.  Given the price of the calls involved, seems like a cheap
optimization.

------------------------------------
jra asked:
    Do you have any idea on how many calls it saves,
    and what help the optimization gives ?


As far as calls: Not 100% sure, dtrace pointed the issue out to me, and when I
saw 10-50%(Or more), I looked for an easy fix.

The real expense here is the fnctl locks on the database.  That's pretty
painful.  1000ns per call, and probably 3-4 calls in that chain.  So it doesn't
take much to come out ahead was my math.
Comment 1 Jeremy Allison 2011-08-22 19:48:09 UTC
Created attachment 6799 [details]
git-am fix for 3.6.1

Volker, please review for 3.6.1.

Jeremy.
Comment 2 Karolin Seeger 2011-08-23 18:29:42 UTC
Pushed to v3-6-test.
Closing out bug report.

Thanks!