mysql scaling questions

Ivan Voras ivoras at freebsd.org
Tue Jan 1 14:44:51 PST 2008


Kris Kennaway wrote:

> So it is using getpid?  It should be fine on FreeBSD with the previous
> provisos, but you also need to check Linux behaviour and compare on
> identical hardware before you can draw conclusions.

Here's the source of unixbench syscall benchmark:

unsigned long iter;

void report()
{
        fprintf(stderr,"%ld loops\n", iter);
        exit(0);
}

int main(argc, argv)
int     argc;
char    *argv[];
{
        int     duration;

        if (argc != 2) {
                printf("Usage: %s duration\n", argv[0]);
                exit(1);
        }

        duration = atoi(argv[1]);

        iter = 0;
        wake_me(duration, report);

        while (1) {
                close(dup(0));
                getpid();
                getuid();
                umask(022);
                iter++;
        }
        /* NOTREACHED */
}

As I count it, getpid() is one of 5 syscalls made. Of these, getpid()
and getuid() might be cached on Linux in some way, which actually could,
with the difference in CPU speed, cause the difference. I can't check it
on identical hardware.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 250 bytes
Desc: OpenPGP digital signature
Url : http://lists.freebsd.org/pipermail/freebsd-performance/attachments/20080101/5c14502b/signature.pgp


More information about the freebsd-performance mailing list