fstat on Linux in glibc is slow !

Jeremy Allison jra at samba.org
Fri Sep 15 16:11:01 UTC 2023


On Fri, Sep 15, 2023 at 08:54:49AM -0700, Christof Schmitt wrote:
>On Thu, Sep 14, 2023 at 11:46:26AM -0700, Jeremy Allison via samba-technical wrote:
>> https://lwn.net/SubscriberLink/944214/ca0c0f366ada686a/
>>
>> Maybe an easy performance win if we use a replacement
>> for fstat until this gets into glibc ?
>>
>> We use fstat a lot and assumed it was fast.
>
>So just call syscall(SYS_fstat, ...) in sys_fstat? That would be an easy
>change.  Demonstrating that this has a performance impact would be the
>difficult part.

Yep, that seems to be the fix (for x86_64 at least).



More information about the samba-technical mailing list