Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 10 Feb 2016 01:28:37 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-fs@FreeBSD.org
Subject:   [Bug 207022] stat() 4 to 16 times slower on FreeBSD/UFS than on Linux/Ext4
Message-ID:  <bug-207022-3630-h5Ly063xxB@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-207022-3630@https.bugs.freebsd.org/bugzilla/>
References:  <bug-207022-3630@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D207022

--- Comment #13 from Steven Hartland <smh@FreeBSD.org> ---
How much time is this really using when testing here with
=3D=3D gen =3D=3D
perl -e 'for (1..4200) {my $file =3D "file$_";open(my $fh, ">", $file) or d=
ie
"cannot open > $file: $!";}'
/=3D=3D gen =3D=3D

=3D=3D bin =3D=3D
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include <stdio.h>
#include <err.h>
#include <sysexits.h>

int main(int argc, char* argv[])
{
        struct stat buf;
        char name[1024];
        int i;

        for (i =3D 1; i <=3D 4200; i++) {
                sprintf(name, "file%d", i);
                if (stat(name, &buf) !=3D 0) {
                        printf("Tested %d files\n", i - 1);
                        err(EX_OSERR, NULL);
                }
        }
        printf("Tested %d files\n", i - 1);
}
/=3D=3D bin =3D=3D
I'm seeing:
/usr/bin/time ./test
Tested 4201 files
        0.00 real         0.00 user         0.00 sys

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-207022-3630-h5Ly063xxB>