From owner-freebsd-hackers Thu Mar 7 7:19:46 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 8875F37B41A for ; Thu, 7 Mar 2002 07:18:46 -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 g27FGsJ46102 for ; Thu, 7 Mar 2002 17:16:55 +0200 (EET) (envelope-from mitko@rila.bg) Date: Thu, 7 Mar 2002 16:58:51 +0200 From: Dimitar Peikov (by way of Dimitar Peikov ) To: "cjp" Subject: Re: Swapping performance Message-Id: <20020307165851.79f391f3.mitko@rila.bg> In-Reply-To: <05fe01c1c5e6$6a02e890$2400010a@eight> References: <20020307104518.0f73740b.mitko@rila.bg> <05fe01c1c5e6$6a02e890$2400010a@eight> 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: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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 On Thu, 7 Mar 2002 09:42:44 -0500 "cjp" wrote: > This is a comparison of how fast Linux can do something > STUPID versus how fast a real OS can do something intelligently. Your > test is giving you misleading, and dangerous numbers. Do not go waving > them around until you have actually looked at mallocs behavior on the > different systems. In fact if I have to compute something really important for me (STUPID as you said) I would choose the fastest OS. I start this thread not to blame against *BSD architecture but the see if there is a way to fix this and to catch the right person who had more experience than me in this area! I have no idea to start anything that would be treated as blame against FreeBSD and against any of the developers who support it! Further more I prefer FreeBSD than Linux, but if I have to wait one day to calculate something on FreeBSD and to wait a few hours less using Linux I would run Linux or Solaris or whatever. If I don't like FreeBSD I would not post my letter, I don't like to loose my time with something that is STUPID! I don't know if your case is this! > > Here's why: > > Linux implements a brain dead memory allocation > scheme called memory overcommit. It will let you malloc > as much memory as you want whether it is available as RAM or not > and only bitch when you try to use the memory. Therefore, > Linux malloc is much faster than any reasonable system, since all it is > doing is handing out address space out of unallocated address space, > not keeping track of how much memory there actually is. > > In order to handle the kruft that occurs, there is the out of memory > killer, oom_killer. > Which merrily goes through the list of processes, killing off the low > priority processes > until enough memory is free to satisfy what was most recently used. It's > the loan shark > repayment program, with OOMKiller performing the function of the > deliquency reminder. > > On any of the BSD system, you actually get memory you can use, and all the > overhead > of assuring its existence at the time of allocation. Much more robust, > less prone to abuse. > > Try it, you'll like it. If you want the nuts and bolts of it, read the > source. > > > ----- Original Message ----- > From: "Dimitar Peikov" > To: > Sent: Thursday, March 07, 2002 3:45 AM > Subject: Swapping performance > > > > 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 > > > -- 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 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message