[Dclug] Re: [Novalug] Hangs

Navy Dragon thenavydragon at gmail.com
Thu Nov 8 20:39:12 EST 2007


I did look at swap, and am using a little, but this problem occurs
even before I start using swap space (I constantly monitor my memory
usage through gkrellm).  After my system has been up for a few days, I
begin to swap, but this is because I keep a lot of applications open
on my desktop.  In any case, this problem has manifested itself soon
after a reboot when I am not swapping at all.

I am not surprised as to when my CPU goes to 100%, as I expect it
based on what I am running.  The problem is the impact this has on the
entire system.  Obviously I expect the system not to respond as
quickly under heavy load, but I don't expect the entire interface to
freeze while this is happening.  On previous systems I have been able
to consistently keep the CPU at 100% based on the programs I am
running, but still have decent responsiveness through the GUI.

Processes that tend to shoot up the CPU are the java compiler, as I am
working on a JEE app for my class as well as when I am emerging (I run
gentoo).

I will try running the memtests the next time I have a chance to take
down my machine.

I would also be interested to see what is currently in swap.  What is
the command to see that?  Also, is it possible to manually flush the
swap if I have reclaimed space on main memory by closing other
programs?

Thanks for the advice.

On Nov 7, 2007 12:48 PM, Emily Ellington <emily at visconsultants.com> wrote:
> On Wed, Nov 07, 2007 at 09:58:32AM -0500, Mike Vore wrote:
> > Date: Wed, 07 Nov 2007 09:58:32 -0500
> > From: Mike Vore <mike at vorefamily.net>
> > Subject: Re: [Dclug] Re: [Novalug] Hangs
> > In-reply-to: <4731AEDF.1010403 at dead-city.org>
> > To: Matt Bidwell <bidwell at dead-city.org>,
> >       DC Linux Users' Group <dclug at tux.org>
> > Reply-To: mike at vorefamily.net
> > List-Id: dclug.calypso.tux.org
> > List-Unsubscribe: <http://calypso.tux.org/cgi-bin/mailman/listinfo/dclug>,
> >       <mailto:dclug-request at calypso.tux.org?subject=unsubscribe>
> > List-Archive: <http://calypso.tux.org/pipermail/dclug>
> > List-Post: <mailto:dclug at calypso.tux.org>
> > List-Help: <mailto:dclug-request at calypso.tux.org?subject=help>
> > List-Subscribe: <http://calypso.tux.org/cgi-bin/mailman/listinfo/dclug>,
> >       <mailto:dclug-request at calypso.tux.org?subject=subscribe>
> > Errors-To: dclug-bounces at calypso.tux.org
> > X-visconsultants-MailScanner-ESVA-Information: Please contact the ISP for more information
> > X-visconsultants-MailScanner-ESVA: Found to be clean
> > X-visconsultants-MailScanner-ESVA-From: dclug-bounces at calypso.tux.org
> > X-Spam-Status: No
>
> >
> > Matt Bidwell wrote:
> > > Navy Dragon wrote:
> > >> I've been experiencing some annoyances lately when my computer is
> > >> under heavy loads.  Frequently, when the CPU is at 100%, then my
> > >> entire system (at least under XFCE) sporadically hangs for a second or
> > >> two.  I'm not 100% sure, but I think this started happening once I
> > >> added an additional 2GB of memory to my existing 2GB.  Here is the
> > >> output of uname -srvmpio:
> > >>
> > >> Linux 2.6.22-gentoo-r8 #1 SMP Sun Oct 28 18:57:18 EDT 2007 x86_64 AMD
> > >> Athlon(tm) 64 X2 Dual Core Processor 4200+ AuthenticAMD GNU/Linux
> > >>
> > >> I was wondering if maybe there is some particular setting or something
> > >> I can do to improve responsiveness while under heavy loads?  I tried
> > >> compiling a new kernel recently that had the options PREEMPT_VOLUNTARY
> > >> and PREEMPT_BKL both turned on.  From what I could gather, these
> > >> options are supposed to improve responsiveness on desktop systems (of
> > >> which mine is), however they seemed to have little effect.
> > >>
> > >> Any advice would be greatly appreciated.
> > >>
> >
> > > Dumb question, but have you tried to look at top when this happens?
> > >
> >
> > It's been a while since I played with memory and disk space, but yes do look
> > at top, and pay attention to swap space. With that much memory you shouldn't
> > need to do much swapping, but if you do it will take more disk swap space.
> >
> > Linux (and Solaris) uses all memory that it can for disk buffer, so if you've
> > been doing lots of disk read/write it will need to be flushed to disk - that
> > takes time. I once had a Solaris client that had problems similar to yours,
> > even the SE from Sun didn't recognize that symptom till I mentioned it, and
> > there was a fix but I don't remember what it was.
> >
> > --
> > Mike Vore
> >    http://www.OhMyWoodness.com
> >    http://www.OhMyWoodness.com/blog  (new - update your Bookmarks)
> > _______________________________________________
> > Dclug mailing list
> > Dclug at calypso.tux.org
> > http://calypso.tux.org/cgi-bin/mailman/listinfo/dclug
> >
> > --
> > This message has been scanned for viruses and
> > dangerous content by ESVA, and is
> > believed to be clean.
>
>
>
>
> Here are some things I would do (in this order):
>
> [rootBvirthost emily]# free -l
>              total       used       free     shared    buffers     cached
> Mem:       1294968    1272360      22608          0      41396    1010960
> Low:        901760     879600      22160
> High:       393208     392760        448
> -/+ buffers/cache:     220004    1074964
> Swap:      1156672      83612    1073060
> --------------------------------------------------------
> Significance: on the "Swap:" line, "Swap free less than swap total"
>   means your system is swapping - that is,
>   it is writing memory pages to disk, which is
>   several orders of magnitude slower than memory
>   access speeds, and to be avoided if at all possible
>   Generally, if you want the best speed,
>   do fewer things or get more memory.
> ---------------------------------------------------------
>
> [rootBvirthost emily]# fdisk -l
>
> Disk /dev/sda: 36.4 GB, 36400005120 bytes
> 255 heads, 63 sectors/track, 4425 cylinders
> Units = cylinders of 16065 * 512 = 8225280 bytes
>
>    Device Boot      Start         End      Blocks   Id  System
> /dev/sda1   *           1          17      136521   83  Linux
> /dev/sda2              18        4281    34250580   83  Linux
> /dev/sda3            4282        4425     1156680   82  Linux swap/Solaris
> --------------------------------------------------------
> Significance: The swap partition (/dev/sda3) size should be bigger than
>  the amount of memory your system has (or might have in the
>  future) If it isn't, the system could be overcome with an inclination
>  to swap out stuff but not have enough disk space in the swap partition
>  to do it, which might make it cry (or hesitate, or hiccup, or explode)
>  There are ways to increase available swap without re-installing -
>   google it if you think this is a critical problem (like ALL
>   of your available swap space is being used, instead of just
>   a tiny fraction) (Linux used to have a max size problem,
>   but I think that has been overcome now.)
> ---------------------------------------------------------
>
>
> Boot with a live cd (SuSE 10.1+ or Knoppix, I think) and choose the
> 'memory test' program at the boot prompt. If at all possible, let this run
> 24 hours and observe the results.
> --------------------------------------------------------
> Significance: If there are errors, you need to replace the bad chips.
> --------------------------------------------------------
>
>
> Use top to see what programs are running
>  when you have performance problems:
>   - are they necessary
>   - are they rogue spam-sending programs?
>   - are they run-away scripts?
> (also note a really good attack would have
> corrupted top to not show the offending programs)
>
>
> Write a script to periodically dump swap to a file, and look
> at that file in the post-mortum after an incident. If you have
> major swap use during the time you have the performance problem,
> you might need more swap space.
>
>
>
>
> Note that I've broken most of my guidelines on this system (I think
> I had to steal some memory out of it to plug performance problems
> elsewhere) - I'm suffering a little from not living up to the
> guidelines, but it's not a totally critical server, and I almost
> never use it for interactive X desktop sessions.
>
>
>
> Good luck.
>
> _______________________________________________
> Dclug mailing list
> Dclug at calypso.tux.org
> http://calypso.tux.org/cgi-bin/mailman/listinfo/dclug
>



More information about the Dclug mailing list