Linux swaps for no reason? Slows down - Help

This is a discussion on Linux swaps for no reason? Slows down - Help ; Hi, I have a "major" performance problem with my server. Although the server has a Gig of ram, after a while it starts to fill the swap space, and there is swap in/out going on. Obviously, it slows down quite ...

+ Reply to Thread
Results 1 to 10 of 10

Thread: Linux swaps for no reason? Slows down

  1. Linux swaps for no reason? Slows down

    Hi,
    I have a "major" performance problem with my server. Although the server
    has a Gig of ram, after a while it starts to fill the swap space, and there
    is swap in/out going on. Obviously, it slows down quite a bit. I am
    running apache/mysql, serving web pages, and also running some background
    data collection processes.

    Here's what I see with vmstat:

    procs memory swap io system
    cpu
    r b swpd free buff cache si so bi bo in cs us sy id
    wa
    2 0 156412 22208 143216 645836 0 204 0 204 148 874 22 7 70
    0

    Hre's what I see with free:

    total used free shared buffers cached
    Mem: 1012340 984112 28228 0 143284 637160
    -/+ buffers/cache: 203668 808672
    Swap: 2040212 156424 1883788


    Please help me. This is totally frustrating!!






  2. Re: Linux swaps for no reason? Slows down

    On Wed, 09 Jun 2004 18:21:13 +0000, steve wrote:

    > Please help me. This is totally frustrating!!

    Which Red Hat version and kernel do you run ?


  3. Re: Linux swaps for no reason? Slows down

    running: Red Hat Enterprise Linux ES release 3 (Taroon Update 1)

    Actually, I had a 400M mysql key_cache which I disabled. Now after one hour
    of fresh boot, my swap is at 60 Meg or so (and growing), which is good. But
    still with one gig of space, there should be no swapping at all.

    Here are the new stats:

    total used free shared buffers cached
    Mem: 1012340 994288 18052 0 31452 823220
    -/+ buffers/cache: 139616 872724
    Swap: 2040212 60916 1979296




    "Nils O. Selåsdal" wrote in message
    newsan.2004.06.09.19.07.00.41581@Utel.no...
    > On Wed, 09 Jun 2004 18:21:13 +0000, steve wrote:
    >
    > > Please help me. This is totally frustrating!!

    > Which Red Hat version and kernel do you run ?
    >




  4. Re: Linux swaps for no reason? Slows down

    Hi Nils,
    I provided the RH version in previous post, how do I get kernel number. The
    server was pre-built for me, so I don't know the kernel #.

    "Nils O. Selåsdal" wrote in message
    newsan.2004.06.09.19.07.00.41581@Utel.no...
    > On Wed, 09 Jun 2004 18:21:13 +0000, steve wrote:
    >
    > > Please help me. This is totally frustrating!!

    > Which Red Hat version and kernel do you run ?
    >




  5. Re: Linux swaps for no reason? Slows down

    On Wed, 09 Jun 2004 21:06:04 +0000, steve wrote:

    > Actually, I had a 400M mysql key_cache which I disabled. Now after one hour
    > of fresh boot, my swap is at 60 Meg or so (and growing), which is good. But
    > still with one gig of space, there should be no swapping at all.
    >
    > Here are the new stats:
    >
    > total used free shared buffers cached
    > Mem: 1012340 994288 18052 0 31452 823220
    > -/+ buffers/cache: 139616 872724
    > Swap: 2040212 60916 1979296


    Not necessarily. The kernel attempts to make optimial use of system
    memory by anticipatory swapping. Each item in the block cache gets
    timestamped (in a way) and after some time, even with _no_ VM
    pressure, unused active blocks will be moved to swap during the
    kernel's free time just in the hopes that when a future need arises
    the kernel will be able to service that more quickly.

    Cheers!


  6. Re: Linux swaps for no reason? Slows down

    On Wed, 09 Jun 2004 21:22:42 +0000, steve wrote:

    > Hi Nils,
    > I provided the RH version in previous post, how do I get kernel number. The
    > server was pre-built for me, so I don't know the kernel #.


    uname -r will give your kernel version.
    As for saying you gave your RH version in a previous post, it doesn't
    help this particular thread does it? Think of each thread as a separate
    conversation, so if someone asks for detail, don't make them hunt the
    history of your posts to get it

    --
    Jafar As-Sadiq Calley
    Senior 1st Officer
    Livewire Airlines
    http://www.livewireairlines.com/


  7. Re: Linux swaps for no reason? Slows down

    On Wed, 09 Jun 2004 21:22:42 +0000, steve wrote:

    > Hi Nils,
    > I provided the RH version in previous post, how do I get kernel number.
    > The server was pre-built for me, so I don't know the kernel #.


    uname -a

    --
    i.m.
    The USA Patriot Act is the most unpatriotic act in American history.


  8. Re: Linux swaps for no reason? Slows down

    Ok, sorry. To consolidate what I am running:

    Red Hat Enterprise Linux ES release 3 (Taroon Update 1)
    Kernel: 2.4.21-9.0.1.ELsmp


    "steve" wrote in message
    news:8319f8ec954260cd46f198e398d72a29@news.teranew s.com...
    > running: Red Hat Enterprise Linux ES release 3 (Taroon Update 1)
    >
    > Actually, I had a 400M mysql key_cache which I disabled. Now after one

    hour
    > of fresh boot, my swap is at 60 Meg or so (and growing), which is good.

    But
    > still with one gig of space, there should be no swapping at all.
    >
    > Here are the new stats:
    >
    > total used free shared buffers cached
    > Mem: 1012340 994288 18052 0 31452 823220
    > -/+ buffers/cache: 139616 872724
    > Swap: 2040212 60916 1979296
    >
    >
    >
    >
    > "Nils O. Selåsdal" wrote in message
    > newsan.2004.06.09.19.07.00.41581@Utel.no...
    > > On Wed, 09 Jun 2004 18:21:13 +0000, steve wrote:
    > >
    > > > Please help me. This is totally frustrating!!

    > > Which Red Hat version and kernel do you run ?
    > >

    >
    >




  9. Re: Linux swaps for no reason? Slows down (fixed)

    After much searching and trial and error, the problem boiled down to mysql
    queries. There were some queries that joined large tables, without using
    proper indexing-- therefor causing large table scans. Naturally these
    caused a huge amount of memory to be used, and started chewing into swap
    area.

    The problem seems to be almost gone now (since I fixed the queries). I
    think this is it. Thanks for everyone who helped me.

    steve


    "steve" wrote in message
    news:773fb18c1671a313e7325c0ce6b804e4@news.teranew s.com...
    > Ok, sorry. To consolidate what I am running:
    >
    > Red Hat Enterprise Linux ES release 3 (Taroon Update 1)
    > Kernel: 2.4.21-9.0.1.ELsmp
    >
    >
    > "steve" wrote in message
    > news:8319f8ec954260cd46f198e398d72a29@news.teranew s.com...
    > > running: Red Hat Enterprise Linux ES release 3 (Taroon Update 1)
    > >
    > > Actually, I had a 400M mysql key_cache which I disabled. Now after one

    > hour
    > > of fresh boot, my swap is at 60 Meg or so (and growing), which is good.

    > But
    > > still with one gig of space, there should be no swapping at all.
    > >
    > > Here are the new stats:
    > >
    > > total used free shared buffers

    cached
    > > Mem: 1012340 994288 18052 0 31452

    823220
    > > -/+ buffers/cache: 139616 872724
    > > Swap: 2040212 60916 1979296
    > >
    > >
    > >
    > >
    > > "Nils O. Selåsdal" wrote in message
    > > newsan.2004.06.09.19.07.00.41581@Utel.no...
    > > > On Wed, 09 Jun 2004 18:21:13 +0000, steve wrote:
    > > >
    > > > > Please help me. This is totally frustrating!!
    > > > Which Red Hat version and kernel do you run ?
    > > >

    > >
    > >

    >
    >




  10. Re: Linux swaps for no reason? Slows down (fixed)

    On Thu, 10 Jun 2004 06:56:34 +0000, steve wrote:

    > The problem seems to be almost gone now (since I fixed the queries). I
    > think this is it. Thanks for everyone who helped me.
    >
    > steve


    Glad to hear you have had some progress. Is Google your friend too?

    --
    Jafar As-Sadiq Calley
    Senior 1st Officer
    Livewire Airlines
    http://www.livewireairlines.com/


+ Reply to Thread