load goes up with 3.0.7

Heinrich Mislik Heinrich.Mislik at univie.ac.at
Fri Oct 22 12:44:42 GMT 2004


On 20 Oct 2004, at 11:25, Jeremy Allison wrote:

> On Tue, Oct 12, 2004 at 06:33:10PM +0200, Heinrich Mislik wrote:
> Content-Description: Mail message body
> > Hi,
> > 
> > after installing 3.0.7 the load was considerably higher then before. 
> > I think one reason is the use of realpath in reduce_name. realpath 
> > needs getwd for a relative path, which can be expensive, when it 
> > encounters large directories. Attached is a patch, that always passes 
> > absolut pathes to realpath. It does so by calling vfs_GetWd and 
> > prepending the result. vfs_GetWd does caching and is much faster then 
> > calling getwd every time. 
> > 
> > I did some testing and found that it works, but don't dare to put it 
> > into production. Can someone who has more insight comment on this?
> 
> The realpath code is only used if symlinks = no or wide links = no.
> I'm kind of inclined to think a performance hit is acceptable to
> ensure correctness in these cases (people who set these parameters
> are more concerned about client leakage out of the share than speed, IMHO
> of course).

Unfortunatly the changes somewhere between 3.0.2a (reduce_name uses 
vfs_GetWd) and 3.0.7 (uses realpath) hit us really hard. The load was 
at least 10 times higher than before. Maybe this is specific to AIX, 
but getwd gets real slow, when there are directories with some 1000s 
of subdirectories (there are 50000 homedirectories distributed on 10 
filesystems on this server).

Conclusion:

I applied that patch and it works great for me. Maybe I'll still 
switch to "wide links = no" in the future.

Thanks for your attention and a great product.

Heinrich Mislik

-- 
Heinrich Mislik
Zentraler Informatikdienst der Universitaet Wien
A-1010 Wien, Universitaetsstrasse 7
Tel.: (+43 1) 4277-14056, Fax: (+43 1) 4277-9140


More information about the samba-technical mailing list