I have just been upgrading my Samba servers from 1.9.18p10 to 2.0.6 So far as I can tell users have been happy (or at least not noticed!). Our clients are almost exclusively NT 4.0 (most at SP5). Our servers are Suns running Solaris 2.5.1 and 7. On upgrading 2 of our busier servers (for admin - home directories and NT binaries), I observed a considerable increase in server load. Home server CPU usage went from 50% with 15% wait IO to 80% with 15% wait IO, Application server CPU went from 10% with 5% wait IO to 60% with 5% wait IO. The configuration did not change much between versions of Samba and by using truss (system call tracer) it was clear that directory stating was taking place every 60 seconds. This was confirmed by: a) increase change notify timeout from 60 to 120 and then 240 and observing decreased load, despite reasonably constant number of connections. (to 45% with 30% wait IO for home server, and 45% with 5% wait IO for application server). b) Turning up logging on selected Samba processes. There may of course be other load factors involved in the transition. Now as far as I can tell, I cannot turn off the change_notify function, is this correct? Will bad things happen if I raise the timeout value to say 10 minutes? Is there any prospect of Kernel support for this feature (ie kernel notifies process of changed directory)? Other there any other obvious performance gotchas going from 1.9.18p10 to 2.0.X? Thanks, -- ----------------------------------------------------------------------------- | Peter Polkinghorne, Computer Centre, Brunel University, Uxbridge, UB8 3PH,| | Peter.Polkinghorne@brunel.ac.uk +44 1895 274000 x2561 UK | -----------------------------------------------------------------------------
You wrote: | Home server CPU usage went from 50% with 15% wait IO to 80% with | 15% wait IO, Application server CPU went from 10% with 5% wait IO | to 60% with 5% wait IO. | | The configuration did not change much between versions of Samba and | by using truss (system call tracer) it was clear that directory | stating was taking place every 60 seconds. [rest snipped] Hmmn: the code is non-trivial, and it uses one of the slowest parts of the fast file system (and it's variants), plus has to enquire of all the files in the directory in order to get their file-changed times. I can't speak to the requirements, as I don't grok NT, but I'm suspicious about the degree to which NT is asking for notification... In particular I wonder if notify is meaningfull on a read-only share: looking at the code in nttrans.c process_pending_change_notify_queue() and friends, it looks as if it could skip all the work on a read-only share. This would address a chunk of the application-server load, commensurate with the number of users mounting it read-only versus read-write. I do think we should be able to set change notify timeout to a distinguished value to make Samba skip the change notify. It's also used in process.c setup_select_timeout() to set the timeout for the select, which will need an edit as well: perhaps something like static int setup_select_timeout(void) { int change_notify_timeout = lp_change_notify_timeout(); ... select_timeout = MIN( select_timeout? select_timeout * 1000: INT_MAX, change_notify_timeout); ... which would make 0 mean "infinite timeout" --dave -- David Collier-Brown, | Always do right. This will gratify some people 185 Ellerslie Ave., | and astonish the rest. -- Mark Twain Willowdale, Ontario | //www.oreilly.com/catalog/samba/author.html Work: (905) 415-2849 Home: (416) 223-8968 Email: davecb@canada.sun.com
> > I have just been upgrading my Samba servers from 1.9.18p10 to 2.0.6 > > So far as I can tell users have been happy (or at least not noticed!). >[SNIP]> > Now as far as I can tell, I cannot turn off the change_notify function, > is this correct? > > Will bad things happen if I raise the timeout value to say 10 minutes? >Well I have done this and nothing bad has been reported.> Other there any other obvious performance gotchas going from 1.9.18p10 to > 2.0.X? >Just to say that further performance comparisons indicate that with "change notify timeout" set to 10 minutes (and probably down to 4 minutes), the performance is not noticeably different in terms of server resources consumed. Things looked worse because the preceding week was inter-semester week and there were fewer administrators around (!). Picking a comparable day back in December gave equivalent CPU usage. Also checking MRTG graphs indicates comparable amounts of data in and out. So basicly my server requirement fears are quelled. -- ----------------------------------------------------------------------------- | Peter Polkinghorne, Computer Centre, Brunel University, Uxbridge, UB8 3PH,| | Peter.Polkinghorne@brunel.ac.uk +44 1895 274000 x2561 UK | -----------------------------------------------------------------------------