*BSD News Article 21567


Return to BSD News archive

Path: sserve!newshost.anu.edu.au!munnari.oz.au!news.Hawaii.Edu!ames!elroy.jpl.nasa.gov!swrinde!cs.utexas.edu!uunet!decwrl!decwrl!usenet.coe.montana.edu!bsd.coe.montana.edu!nate
From: nate@bsd.coe.montana.edu (Nate Williams)
Newsgroups: comp.os.386bsd.questions
Subject: Re: Disk Thrashing question
Date: 28 Sep 1993 01:39:14 GMT
Organization: Montana Stateu University, Bozeman  MT
Lines: 58
Message-ID: <2884k2$d9k@pdq.coe.montana.edu>
References: <1993Sep27.170443.444@doug.cae.wisc.edu>
NNTP-Posting-Host: bsd.coe.montana.edu

In article <1993Sep27.170443.444@doug.cae.wisc.edu>,
John Edward Tillema <tillemaj@cae.wisc.edu> wrote:
>
>
>	I have had FreeBSD running for about a month or so on my 486
>now, and have noticed one major disadvantage to it compared to Linux
>(at least for me).  It seems to take virtually nothing to cause me
>to start swapping like crazy, and even hang the system.  My setup is:
>8 Meg Ram, 17 Meg swap space, 486/33, 340 Meg drive, with 300 for Unix.
 ^^^^^^^^^

>If i run anything in the background, or compile one program, or sun
>a comm program, you can hear the disk swapping like crazy and performance
>really drops(you can easily type a line of text before the first character
>is printed).  I can even hang the system.  I found a good way of doing
>this is the following:
>   run olvwm.
>   run XV and view a gif (or jpg, or probably anything), not necessarily
>          large, the last one was only 200k.
>   run emacs and load in a large file, here I'm talking about a 7 meg file.

With X running (2 - 3 MB), and xv (probably 1 MB with the image displayed)
the system (2 MB in memory) AND emacs ( 1 MB for emacs + 7 MB for the
file you're editing ) you've used up more space than you have available.

Now, since emacs brings everything into memory, there is nothing you can
do about using up all your memory, and Linux *should* act the exact same
way since emacs == emacs == emacs when it comes to GNU emacs.

>The result I get is that it brings the emacs window up, and then all disk 
>activity stops, the mouse doesn't respond, and there is no way to abort
>aside from a reboot of the system.  

Basically, you've got processes competing for available memory space, most
notably emacs.

>In Linux, things would get slow, but 
>never like that, and it never hung like that either, the only crashes I had
>was when running X+openwin in 8 megs w/o swap.  I have narrowed down the 
>FreeBSD kernel so that it only has devices I use (eg. got rid of the SCSI
>stuff).  Is this to be expected?  I wouldn't think so.  

I am mildly suprised that Linux handles running out of memory better,
especially after hearing some of the horror stories that happen when
Linux runs out of memory.  I suppose it's possible that you are also
running out of swap space.  A way to check that is to run swapinfo in
another xterm when you start up emacs, and see what state your system is
in.  


Nate


-- 
nate@bsd.coe.montana.edu     |  Freely available *nix clones benefit everyone,
nate@cs.montana.edu          |  so let's not compete with each other, let's
work #: (406) 994-4836       |  compete with folks who try to tie us down to
home #: (406) 586-0579       |  proprietary O.S.'s (Microsloth) - Me