Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 01 Jan 2008 23:44:18 +0100
From:      Ivan Voras <ivoras@freebsd.org>
To:        freebsd-performance@freebsd.org
Subject:   Re: mysql scaling questions
Message-ID:  <flefo8$cag$1@ger.gmane.org>
In-Reply-To: <477AAC90.4050305@FreeBSD.org>
References:  <20071230134354.GA63555@harmless.hu>	<4777A65C.8020406@FreeBSD.org>	<20071230141118.GA67574@harmless.hu>	<4777AB9C.1010003@FreeBSD.org>	<flb6bp$8kq$1@ger.gmane.org>	<4779BBE8.2050608@FreeBSD.org>	<20080101122249.GA81405@harmless.hu>	<477A32EA.4070500@FreeBSD.org>	<ad79ad6b0801010534u3336c2d5l630c1d18a8a493cd@mail.gmail.com>	<477A4BF1.3050709@FreeBSD.org>	<20080101142116.GA94325@harmless.hu>	<477A4E28.3010003@FreeBSD.org> <fle6vh$320$1@ger.gmane.org> <477AAC90.4050305@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help

[-- Attachment #1 --]
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.



[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHesJIldnAQVacBcgRAh0NAKCh8a3gVrMwd/bPFJ6GSl7Vu4G8TQCfa3pg
yDywMHr2UNqIGWAWdNKVo58=
=Evqg
-----END PGP SIGNATURE-----

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?flefo8$cag$1>