From owner-freebsd-hackers Thu Mar 7 0:45:41 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from earth.rila.bg (earth.rila.bg [194.141.1.31]) by hub.freebsd.org (Postfix) with ESMTP id CD3BF37B402 for ; Thu, 7 Mar 2002 00:45:31 -0800 (PST) Received: from earth.rila.bg (mitko@localhost.rila.bg [127.0.0.1]) by earth.rila.bg (8.11.6/8.11.6) with SMTP id g278jJJ35896 for ; Thu, 7 Mar 2002 10:45:19 +0200 (EET) (envelope-from mitko@rila.bg) Date: Thu, 7 Mar 2002 10:45:18 +0200 From: Dimitar Peikov To: freebsd-hackers@freebsd.org Subject: Swapping performance Message-Id: <20020307104518.0f73740b.mitko@rila.bg> Reply-To: mitko@rila.bg Organization: Rila Solutions X-Mailer: Sylpheed version 0.7.2claws (GTK+ 1.2.10; i386--freebsd4.5) Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="Multipart_Thu__7_Mar_2002_10:45:18_+0200_0829be00" Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG This is a multi-part message in MIME format. --Multipart_Thu__7_Mar_2002_10:45:18_+0200_0829be00 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit I start some performance tests on -stable and on SuSE 7.1 / 2.4.17. I don't comment about 'bzero' performance, but when RAM is over, Linux is much faster. I have no idea what is the algorithm of swapping but it seems that the granularity of swapping pieces is the key or the importance of swapping memory blocks of certain task. Ooo I forgot to say that the both machines have the same hardware, IBM 300PL, 256 RAM and no other tasks running. I had to run these tests to choose the fastest platform for building our software indexes, which requires a lot of math and memory operations. --- with bzero --- Linux$ time ./malloc_test *# real 0m37.640s user 0m1.370s sys 0m2.950s Linux$ FreeBSD$ time ./malloc_test *# real 0m46.640s user 0m2.280s sys 0m2.550s FreeBSD$ --- without bzero --- Linux$ time ./malloc_test *# real 0m6.371s user 0m0.450s sys 0m1.510s Linux$ FreeBSD$ time ./malloc_test *# real 0m11.571s user 0m1.150s sys 0m1.830s FreeBSD$ -- Dimitar Peikov Programmer Analyst Globalization Group "We Build e-Business" RILA Solutions 27 Building, Acad.G.Bonchev Str. 1113 Sofia, Bulgaria phone: (+359 2) 9797320 phone: (+359 2) 9797300 fax: (+359 2) 9733355 http://www.rila.com --Multipart_Thu__7_Mar_2002_10:45:18_+0200_0829be00 Content-Type: application/octet-stream; name="malloc_test.c" Content-Disposition: attachment; filename="malloc_test.c" Content-Transfer-Encoding: base64 I2luY2x1ZGUgPHN0ZGxpYi5oPgojaW5jbHVkZSA8c3RyaW5nLmg+CiNpbmNsdWRlIDxzdGRpby5o PgoKI2RlZmluZSBNQUxMT0NfU0laRSAxMDI0KjEwMjQqMjU2CgppbnQgbWFpbihpbnQgYXJnYywg Y2hhciAqKmFyZ3YpIHsKICBjaGFyICpwdHI7CiAgaW50IGksIGlfY291bnQ7CiAgaW50IGo7Cgog IHB0ciA9IChjaGFyICopIG1hbGxvYyhNQUxMT0NfU0laRSk7CiAgYnplcm8ocHRyLCBNQUxMT0Nf U0laRSk7CgogIGlfY291bnQgPSBNQUxMT0NfU0laRSAvIDE2OwogIGZwcmludGYoc3RkZXJyLCAi KiIpOwogIGZvciAoaSA9IDA7IGkgPCBpX2NvdW50OyBpICsrKSB7CiAgICAgIHB0cltpID4+IDRd ID0gcHRyWyhpID4+IDMpICsgMV0rKzsKICB9CiAgZnByaW50ZihzdGRlcnIsICIjIik7CiAgZm9y IChqID0gMDsgaiA8IGlfY291bnQ7IGogKyspIHsKICAgICAgcHRyW2ogPDwgNF0gPSBwdHJbKGog Pj4gMykgKyAxXSsrOwogIH0KCiAgZnJlZShwdHIpOwogIHJldHVybiAwOwp9Cg== --Multipart_Thu__7_Mar_2002_10:45:18_+0200_0829be00-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message