From: hedrick@geneva.rutgers.edu (Charles Hedrick) Subject: Re: NT vs Linux (was: Re: truth or dare) Date: 9 Jul 1993 16:20:58 GMT
gthaker@atl.ge.com (Gautam H. Thaker) writes:
>I too am really very happy with the speed of things like zcat |tar etc. on
>Linux. Is this all due to the buffer cache? I have been compiling same
>program both on Linux (8 Mb, 486/33 64k cache) and SUN SS2 (48 Mb, SUNOS
>4.1.3) with gcc 2.x.x. On Linux it compiles and links much much
>faster. Runs faster too, which I find even harder to believe. I hope to do
>some exact tests and post numbers. SS2 has no excuse for being slower.
>Perhaps SS2 is slower due to NFS, but with 48 Mb of memory not much else
>being done subsequent gcc calls ought to be fast, but are still rather slow.
As far as I know, all Unix variants have buffer cache of some sort.
In principle SunOS 4.x and Linux have similar cache -- both have
replaced the traditional separate I/O cache by code that allows memory
to be used dynamically for either programs or buffer. Oddly enough,
in Linux this change was done to improve performance on smaller
systems, but on SunOS it made improvement worse on smaller systems.
SunOS and other commercial versions have gone through years of
development. As you keep adding features without a complete redesign,
code gets more and more convoluted. When Sun did their new memory
manager for 4.0 (which merged program and buffer memory, and allowed
mmap), the result was incredibly complex. There was a serious bug in
NFS that resulted in file corruption. It took a couple of years to
find. I was actually amazed they found it at all, given the
complexity of the code. There could be a number of things
contributing to the situation: Linux was originally designed by a
single person, who knew what sort of features he was going to want and
took them into account in the beginning. (But note that there have
been major redesigns during the history of Linux, and generally they
did not cause bloat.) Keeping it simple was a major goal, and Linus
is willing to use special features of the hardware. (But I'm not
convinced that porting Linux is going to be any more difficult than
porting SunOS.) Linus may also be more motivated to get good
performance out of the hardware. Unlike the purveyors of most Unix
systems, he's not also selling hardware. But USL isn't either, and
they're certainly involved in the code bloat.
But despite all of these explanations, at some point one begins to
conclude that Linus is simply a better software designer than the
people working on SunOS. That's not impossible -- it's been known for
years that there are a relatively small number of people who are
simply an order of magnitude better than others at programming. At
one point the literature called them super-programmers. A kernel
designed by a single super-programmer is just going to be better than
a kernel built by large teams in at least two different organizations.
He's not alone -- some of the people in Bell Labs who have been
involved in Unix are clearly as good. Unfortunately ATT had a large
organization whose purpose seemed to many of us to be preventing the
world from directly benefitting from the work of these few people.
There are also some extremely good people working at Berkeley,
particularly in the networking area. (The one big weakness of Linux
is that we are not willing to take advantage of their work. I hope I
don't offend the folks who have worked on Linux networking when I say
that they simply aren't at the level of Van Jacobson and some of the
others who have been working on recent BSD releases.)