Return to BSD News archive
Path: euryale.cc.adfa.oz.au!newshost.anu.edu.au!harbinger.cc.monash.edu.au!news.rmit.EDU.AU!news.unimelb.EDU.AU!munnari.OZ.AU!spool.mu.edu!olivea!decwrl!news.zocalo.net!news.zeitgeist.net!usenet From: "Amancio Hasty Jr." <hasty@star-gate.com> Newsgroups: comp.unix.bsd.freebsd.misc Subject: Re: Linux vs. FreeBSD ... (FreeBSD extremely mem/swap hungry) Date: Fri, 24 May 1996 12:42:49 -0700 Organization: TLGnet Inc., (formerly The Little Garden) Lines: 172 Message-ID: <31A61139.41C67EA6@star-gate.com> References: <3188C1E2.45AE@onramp.net> <4mnsc5$6qo@sundial.sundial.net> <4mr1pk$cdi@dyson.iquest.net> <4n0dhd$cff@agate.berkeley.edu> <3194622D.41C67EA6@Ami-chan.res.cmu.edu> <31A52667.794BDF32@zeus.co.uk> NNTP-Posting-Host: rah.star-gate.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 3.0b3 (X11; I; FreeBSD 2.1-STABLE i386) Damian Reeves wrote: > > Yun-Ching (Allen) Lee wrote: > > > > > Performance: Since I only have a 486DX 33 with 20 MB of RAM, I want > > > to squeeze every last bit of performance out of it. When I was using > > Linux with 35 MB of swap, I have never let the swap usage go above 20 > > MB when running X. Because, around that number, the disk swapping > > becomes horrendously slow. When using FreeBSD, I can hardly feel the > lag caused by swapping, but the processes take more real and swap > > memory. > > Your damm right they do! I think the FreeBSD developer's are subsidised > by ram and harddrive manufactures. > > We took a 32mb machine here which was running Linux and converted it to > running FreeBSD 2.1 for porting purposes. On the Linux box, after > booting up, running X11R6, opening a few xterms, xbiff etc., a 'top' > would show that about 10mb of memory was in use, and around 18Mb was > used for buffer cache, an no swap space in use. > > On replacing with BSD, and copying over the .xsession files etc., by the > time the Xserver and xterms have started, 50MB of swap is in use!!! > I had to increase the swap space upto 250Mb just so we could actually > compile our server code. At the moment, the machine is sitting there > with 1 user logged in, emacs, netscape and a couple of shells. top > reports that 59% of the swap space is in use! top also reports that > only 860k is available for buffer cache, in fact I've never seen it go > over 1200k. This is extremely different to under linux, where it used > to stay around 12Mb-15Mb under use. > > Now, one has to ask WHY? The Linux box could have all these apps in and > more with less than a couple of Mb in swap if any. Another related > issue is that FreeBSD seems a lot more swap-happy than Linux. If I > leave the emacs alone for a couple of minutes, when I return to it I > have to wait a good few seconds of hard-drive thrashing before it will > response to my keystrokes. This paging also seems to lock the entire > machine at lot more than under linux (EIDE drive subsystem). > > However, on saying that, the server does actually compile marginally > faster than under Linux, although this might be due to the slightly > older version of GCC (2.6.3 as opposed to 2.7.2 - related note: does > anyone have a gcc/g++ 2.7.2 working properly yet or do FreeBSD people > not care?) > > In summary then, its fast, but resource hungry in the extreme. I guess > the default malloc() behaviour is different than in Linux, where a > malloc() doesn't actually reserve the memory until you actually dirty > the pages. I'd say there is probably a memory leak in the system libc > as well. One more thing, using tmpfs really eats VM, and I'm not sure > if it actually returns it to the system on deleting files in there. > Yes, we have /usr/local/bin/gcc -v Reading specs from /usr/local/lib/gcc-lib/pentium-unknown-freebsd/2.7.2/specs gcc version 2.7.2 as well as gcc-2.7.3 ported. I have on my system 32MB and I run my X server in 24bit mode. swapinfo reports: /dev/sd0s1b 126976 27720 99192 22% Interleaved I don't need 250MB of swap space and yes I have compile large packages. This is everything that I have running on my system: USER PID %CPU %MEM VSZ RSS TT STAT STARTED TIME COMMAND root 158 2.8 28.7 5756 8732 ?? S 5:03AM 2:58.34 /usr/X11R6/bin/X :0 -bpp 24 (XF86_S3) hasty 2126 1.3 10.6 6472 3232 p1 S 12:24PM 0:16.22 netscape root 2 0.0 0.1 0 12 ?? DL 10:00PM 0:03.37 (pagedaemon) root 3 0.0 0.1 0 12 ?? DL 10:00PM 0:02.02 (vmdaemon) root 4 0.0 0.1 0 12 ?? DL 10:00PM 0:03.35 (update) root 25 0.0 0.0 216 0 ?? IWs 10:00PM 0:00.01 adjkerntz -i root 31 0.0 0.3 1192 72 ??- S 5:00AM 0:04.44 /usr/sbin/snmpd root 63 0.0 0.4 184 116 ?? Ss 5:00AM 0:00.31 syslogd daemon 69 0.0 0.0 176 0 ?? IWs 5:00AM 0:00.01 portmap root 80 0.0 0.0 224 0 ?? IWs 5:00AM 0:00.31 inetd root 87 0.0 0.5 268 136 ?? Is 5:01AM 0:00.42 cron root 89 0.0 0.0 200 0 ?? IWs 5:01AM 0:00.04 lpd root 95 0.0 0.0 416 0 ?? IWs 5:01AM 0:00.11 sendmail: accepting connections (sendmail) root 136 0.0 0.0 404 0 ?? IWs 5:01AM 0:03.19 /usr/local/sbin/sshd root 138 0.0 0.3 348 80 ?? Ss 5:01AM 0:06.36 /usr/local/bin/httpd -f /usr/local/etc/apache/conf/httpd.conf -- nobody 141 0.0 0.0 396 0 ?? IW 5:01AM 0:00.07 /usr/local/bin/httpd -f /usr/local/etc/apache/conf/httpd.conf nobody 142 0.0 0.0 408 0 ?? IW 5:01AM 0:00.08 /usr/local/bin/httpd -f /usr/local/etc/apache/conf/httpd.conf nobody 143 0.0 0.0 408 0 ?? IW 5:01AM 0:00.08 /usr/local/bin/httpd -f /usr/local/etc/apache/conf/httpd.conf nobody 144 0.0 0.0 408 0 ?? IW 5:01AM 0:00.11 /usr/local/bin/httpd -f /usr/local/etc/apache/conf/httpd.conf hasty 145 0.0 0.0 628 0 v0 IWs 5:01AM 0:00.26 -tcsh (tcsh) root 146 0.0 0.0 156 0 v1 IWs+ 5:01AM 0:00.02 /usr/libexec/getty Pc ttyv1 root 147 0.0 0.0 156 0 v2 IWs+ 5:01AM 0:00.02 /usr/libexec/getty Pc ttyv2 hasty 156 0.0 0.0 468 0 v0 IW+ 5:03AM 0:00.04 /bin/csh /usr/local/bin/s24 24 hasty 157 0.0 0.0 192 0 v0 IW+ 5:03AM 0:00.07 /usr/X11R6/bin/xinit -- /usr/X11R6/bin/X :0 -bpp 24 hasty 161 0.0 0.0 460 0 v0 IW 5:03AM 0:00.02 sh /usr/hasty/.xinitrc hasty 165 0.0 1.5 512 464 v0 S 5:03AM 0:03.06 fvwm95-2 hasty 166 0.0 0.2 144 52 v0 S 5:03AM 0:00.11 /usr/X11R6/lib/X11/fvwm95-2/FvwmAuto 9 6 .fvwm2rc95 0 8 300 hasty 169 0.0 0.6 272 180 v0 S 5:03AM 0:00.19 /usr/X11R6/lib/X11/fvwm95-2//FvwmButtons 10 5 .fvwm2rc95 0 8 hasty 170 0.0 1.3 292 376 v0 S 5:03AM 0:00.69 /usr/X11R6/lib/X11/fvwm95-2//FvwmTaskBar 12 5 .fvwm2rc95 0 8 hasty 172 0.0 0.9 220 256 v0 S 5:03AM 0:08.43 xclock -bg #c3c3c3 -geometry -1500-1500 -padding 0 -update 1 hasty 173 0.0 0.0 468 0 v0 IW 5:03AM 0:00.01 /bin/sh -c nice -16 xload -fg red -nolabel -bg grey60 -update 5 -g hasty 174 0.0 0.9 276 272 v0 SN 5:03AM 0:02.74 xload -fg red -nolabel -bg grey60 -update 5 -geometry -1500-1500 hasty 175 0.0 0.8 232 232 v0 S 5:03AM 0:00.40 /usr/X11R6/lib/X11/fvwm95-2//FvwmPager 14 5 .fvwm2rc95 0 8 0 0 root 177 0.0 0.9 556 280 v0 S 5:03AM 1:09.60 color_xterm -sb -sl 500 -j -ls -fn 7x14 -fb 7x14bold -title Color hasty 178 0.0 0.0 644 0 p0 IWs 5:03AM 0:00.13 -tcsh (tcsh) root 180 0.0 2.7 560 812 v0 R 5:03AM 1:09.66 color_xterm -sb -sl 500 -j -ls -fn 7x14 -fb 7x14bold -title Color hasty 181 0.0 1.4 652 408 p1 Ss 5:03AM 0:00.41 -tcsh (tcsh) hasty 183 0.0 0.0 200 0 p0 IW+ 5:03AM 0:00.09 rlogin cioloco hasty 184 0.0 0.0 200 0 p0 IW+ 5:03AM 0:00.09 rlogin ciolocohasty 209 0.0 5.4 7104 1628 p1 I 5:13AM 1:21.31 /usr/local/bin/wish -f /usr/local/bin/exmh hasty 229 0.0 2.3 2036 704 p1 I 5:13AM 0:10.90 /usr/local/bin/wish -f /usr/local/bin/exmh-bg exmh /usr/local/lib/ ftp 322 0.0 0.6 308 172 ?? I 5:21AM 0:01.57 -ran.kaist.ac.kr: anonymous/yichoi@ran.kaist.ac.kr: RETR /pub/./li nobody 551 0.0 0.0 420 0 ?? IW 6:21AM 0:00.10 /usr/local/bin/httpd -f /usr/local/etc/apache/conf/httpd.conf nobody 843 0.0 0.0 420 0 ?? IW 7:15AM 0:00.10 /usr/local/bin/httpd -f /usr/local/etc/apache/conf/httpd.conf root 2190 0.0 5.0 556 1528 v0 S 12:33PM 0:01.07 color_xterm -sb -sl 500 -j -ls -fn 7x14 -fb 7x14bold -title Color hasty 2191 0.0 2.9 644 876 p2 Is+ 12:33PM 0:00.16 -tcsh (tcsh) hasty 2194 0.0 16.8 4700 5108 p2 S 12:34PM 0:03.43 emacs (xemacs-19.13) root 0 0.0 0.0 0 0 ?? DLs - 0:00.00 (swapper) hasty 2264 0.0 0.7 472 220 p1 R+ 12:38PM 0:00.01 ps xuaw root 1 0.0 0.1 364 12 ?? Is 10:00PM 0:00.03 /sbin/init -- Amancio --- Hasty Software Consulting Services Tel: 415-495-3046 Fax: 415-495-3046 Cellular: 415-309-8434 e-mail: hasty@star-gate.com Powered by FreeBSD