Swap usage on RH 9

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Benoit St-Jean

    Swap usage on RH 9

    I am wondering if the "swap bug" is present on my kernel/version of
    RedHat 9 as described at:


    It looks like the OS prefers to fill the swap instead of releasing the
    "unused" memory and use the available RAM. This problem is especially
    present when starting the MySQL server and executing lots of big
    queries... Swap file grows and grows and is never released even
    though there is available memory.

    When the MySQL server is not loaded, I still have 152Mb of swap used
    and it goes up to 377Mb when using MySQL! Slowly but surely the swap
    grows bigger and bigger... Am I having hallucinations or there's
    something obvious I am mising here? Any hint/suggestion/explanation
    on this problem?

    Environment:

    OS: Linux RedHat 9
    Kernel: 2.4.25-040218
    Intel Pentium 4 2.4 Ghz
    512 Mb DDR RAM
    40 Gb IDE disk

    MySQL 3.32.58

    Here's the output of command top:
    =============== =======
    09:50:13 up 23 days, 20:42, 6 users, load average: 0.08, 0.03,
    0.01
    101 processes: 100 sleeping, 1 running, 0 zombie, 0 stopped
    CPU states: 3.8% user 1.0% system 0.0% nice 0.0% iowait 95.1%
    idle
    Mem: 507036k av, 501176k used, 5860k free, 0k shrd,
    65568k buff
    133504k active, 288820k inactive
    Swap: 787176k av, 154268k used, 632908k free
    322128k cached

    PID USER PRI NI SIZE RSS SHARE STAT %CPU %MEM TIME CPU
    COMMAND
    23227 root 19 0 1196 1196 876 S 1.9 0.2 0:03 0 top
    23270 root 14 0 1160 1160 852 R 1.9 0.2 0:00 0 top
    1 root 8 0 104 72 52 S 0.0 0.0 0:23 0 init
    2 root 9 0 0 0 0 SW 0.0 0.0 0:00 0
    keventd
    3 root 19 19 0 0 0 SWN 0.0 0.0 0:00 0
    ksoftirqd_CPU0
    4 root 9 0 0 0 0 SW 0.0 0.0 13:32 0
    kswapd
    5 root 9 0 0 0 0 SW 0.0 0.0 0:04 0
    bdflush
    6 root 9 0 0 0 0 SW 0.0 0.0 0:09 0
    kupdated
    7 root 9 0 0 0 0 SW 0.0 0.0 0:04 0
    pagebufd
    8 root 9 0 0 0 0 SW 0.0 0.0 0:00 0
    xfslogd/0
    9 root 9 0 0 0 0 SW 0.0 0.0 0:00 0
    xfsdatad/0
    11 root 9 0 0 0 0 SW 0.0 0.0 7:51 0
    kjournald
    604 root 9 0 0 0 0 SW 0.0 0.0 0:00 0
    kjournald
    919 root 9 0 628 452 380 S 0.0 0.0 0:03 0
    dhclient
    959 root 9 0 252 208 192 S 0.0 0.0 0:04 0
    syslogd
    963 root 9 0 88 40 40 S 0.0 0.0 0:00 0
    klogd
    1042 named 9 0 1140 732 564 S 0.0 0.1 0:23 0
    named
    1060 root 8 0 352 216 172 S 0.0 0.0 0:01 0 sshd
    1074 root 9 0 588 448 444 S 0.0 0.0 0:00 0
    xinetd
    1091 ntp 9 0 2404 2404 2172 S 0.0 0.4 0:54 0 ntpd
    1201 root 9 0 17504 4 0 S 0.0 0.0 0:00 0
    spamd
    1219 root 9 0 256 4 0 S 0.0 0.0 0:00 0
    stunnel
    1277 root 9 0 1328 132 112 S 0.0 0.0 1:38 0
    httpsd
    1297 root 9 0 192 164 124 S 0.0 0.0 0:02 0
    crond
    1426 xfs 9 0 2240 92 68 S 0.0 0.0 0:00 0 xfs
    1449 mailman 9 0 2864 188 184 S 0.0 0.0 0:00 0
    python
    1454 root 9 0 76 32 28 S 0.0 0.0 0:00 0
    mingetty
    1455 root 9 0 76 32 28 S 0.0 0.0 0:00 0
    mingetty
    1456 root 9 0 76 32 28 S 0.0 0.0 0:00 0
    mingetty
    1457 root 9 0 76 32 28 S 0.0 0.0 0:00 0
    mingetty
    1458 root 9 0 76 32 28 S 0.0 0.0 0:00 0
    mingetty
    1459 root 9 0 76 32 28 S 0.0 0.0 0:00 0
    mingetty
    1460 root 9 0 76 32 28 S 0.0 0.0 0:00 0
    agetty
    1461 mailman 9 0 3020 1120 312 S 0.0 0.2 3:20 0
    python
    1462 mailman 9 0 3028 1144 652 S 0.0 0.2 0:05 0
    python
    1463 mailman 9 0 3060 1104 348 S 0.0 0.2 3:15 0
    python
    1464 mailman 9 0 3060 1176 352 S 0.0 0.2 3:16 0
    python
    1465 mailman 9 0 3096 1152 348 S 0.0 0.2 3:18 0
    python
    1466 mailman 9 0 3140 1188 356 S 0.0 0.2 3:22 0
    python
    1467 mailman 9 0 3052 1052 352 S 0.0 0.2 3:20 0
    python
    4070 popuser 9 0 17148 8 4 S 0.0 0.0 0:00 0
    spamd
    4072 popuser 9 0 17148 8 4 S 0.0 0.0 0:00 0
    spamd
    16291 root 9 0 3036 652 624 S 0.0 0.1 0:56 0
    httpd
    18909 root 9 0 456 404 400 S 0.0 0.0 0:00 0
    couriertcpd
    18912 root 9 0 268 232 228 S 0.0 0.0 0:00 0
    courierlogger
    18920 root 8 0 456 404 400 S 0.0 0.0 0:00 0
    couriertcpd
    18922 root 9 0 268 232 228 S 0.0 0.0 0:00 0
    courierlogger
    18929 root 9 0 460 428 404 S 0.0 0.0 0:00 0
    couriertcpd
    18931 root 9 0 420 408 364 S 0.0 0.0 0:00 0
    courierlogger
    18939 root 9 0 444 392 388 S 0.0 0.0 0:00 0
    couriertcpd
    18943 root 9 0 264 228 224 S 0.0 0.0 0:00 0
    courierlogger
    19089 qmails 9 0 352 336 280 S 0.0 0.0 0:00 0
    qmail-send
    19091 qmaill 9 0 412 400 396 S 0.0 0.0 0:00 0
    splogger
    19092 root 9 0 332 304 292 S 0.0 0.0 0:00 0
    qmail-lspawn
    19093 qmailr 9 0 300 228 224 S 0.0 0.0 0:00 0
    qmail-rspawn
    19094 qmailq 9 0 300 272 268 S 0.0 0.0 0:00 0
    qmail-clean
    21849 root 9 0 1100 1100 944 S 0.0 0.2 0:00 0
    safe_mysqld
    21870 mysql 9 0 6240 6240 2384 S 0.0 1.2 0:01 0
    mysqld
    22955 root 9 0 1456 1456 1108 S 0.0 0.2 0:00 0 bash
    23000 root 9 0 1456 1456 1108 S 0.0 0.2 0:00 0 bash
    23045 root 9 0 1456 1456 1108 S 0.0 0.2 0:00 0 bash
    23090 root 9 0 1452 1452 1104 S 0.0 0.2 0:00 0 bash
    23135 root 9 0 1468 1468 1112 S 0.0 0.2 0:00 0 bash
    23180 root 11 0 1464 1464 1108 S 0.0 0.2 0:00 0 bash
    23229 root 9 0 732 732 600 S 0.0 0.1 0:00 0
    mysqladmin
    23234 root 9 0 2152 2152 1436 S 0.0 0.4 0:00 0
    mysql
    23236 root 9 0 1712 1712 1388 S 0.0 0.3 0:00 0
    mysql
    =============== =============

    Thank you
  • RodgerH

    #2
    Re: Swap usage on RH 9

    Benoit St-Jean wrote:[color=blue]
    > I am wondering if the "swap bug" is present on my kernel/version of
    > RedHat 9 as described at:
    > http://bugzilla.redhat.com/bugzilla/...g.cgi?id=89226
    >
    > It looks like the OS prefers to fill the swap instead of releasing the
    > "unused" memory ...[/color]

    Ideally, you don't want the system to have to swap at all, and the
    solution to that is add more RAM. Maybe you should increase your RAM up
    to 1GB. If your system does not need to swap - then you will not to be
    concerned about any "swap bug", as well as getting the better performance.

    --
    Regards,
    Rodger
    ---
    Fedora: Registered Linux User #285004.
    ---
    "Do, or do not. There is no try." -- A Jedi Master.
    ---

    Comment

    • RodgerH

      #3
      Re: Swap usage on RH 9

      Benoit St-Jean wrote:[color=blue]
      > I am wondering if the "swap bug" is present on my kernel/version of
      > RedHat 9 as described at:
      > http://bugzilla.redhat.com/bugzilla/...g.cgi?id=89226
      >
      > It looks like the OS prefers to fill the swap instead of releasing the
      > "unused" memory ...[/color]

      Ideally, you don't want the system to have to swap at all, and the
      solution to that is add more RAM. Maybe you should increase your RAM up
      to 1GB. If your system does not need to swap - then you will not to be
      concerned about any "swap bug", as well as getting the better performance.

      --
      Regards,
      Rodger
      ---
      Fedora: Registered Linux User #285004.
      ---
      "Do, or do not. There is no try." -- A Jedi Master.
      ---

      Comment

      • RodgerH

        #4
        Re: Swap usage on RH 9

        Benoit St-Jean wrote:[color=blue]
        > I am wondering if the "swap bug" is present on my kernel/version of
        > RedHat 9 as described at:
        > http://bugzilla.redhat.com/bugzilla/...g.cgi?id=89226
        >
        > It looks like the OS prefers to fill the swap instead of releasing the
        > "unused" memory ...[/color]

        Ideally, you don't want the system to have to swap at all, and the
        solution to that is add more RAM. Maybe you should increase your RAM up
        to 1GB. If your system does not need to swap - then you will not to be
        concerned about any "swap bug", as well as getting the better performance.

        --
        Regards,
        Rodger
        ---
        Fedora: Registered Linux User #285004.
        ---
        "Do, or do not. There is no try." -- A Jedi Master.
        ---

        Comment

        • Benoit St-Jean

          #5
          Re: Swap usage on RH 9

          RodgerH <rodgerlee@yaho o.com> wrote in message news:<AHaec.140 46$So3.579346@t wister.southeas t.rr.com>...[color=blue]
          > Benoit St-Jean wrote:[color=green]
          > > I am wondering if the "swap bug" is present on my kernel/version of
          > > RedHat 9 as described at:
          > > http://bugzilla.redhat.com/bugzilla/...g.cgi?id=89226
          > >
          > > It looks like the OS prefers to fill the swap instead of releasing the
          > > "unused" memory ...[/color]
          >
          > Ideally, you don't want the system to have to swap at all, and the
          > solution to that is add more RAM. Maybe you should increase your RAM up
          > to 1GB. If your system does not need to swap - then you will not to be
          > concerned about any "swap bug", as well as getting the better performance.[/color]

          Well, that's the problem. Even if you have 1Gb of RAM, it just
          doesn't use it and prefers to fill the swap!

          Comment

          • Benoit St-Jean

            #6
            Re: Swap usage on RH 9

            RodgerH <rodgerlee@yaho o.com> wrote in message news:<AHaec.140 46$So3.579346@t wister.southeas t.rr.com>...[color=blue]
            > Benoit St-Jean wrote:[color=green]
            > > I am wondering if the "swap bug" is present on my kernel/version of
            > > RedHat 9 as described at:
            > > http://bugzilla.redhat.com/bugzilla/...g.cgi?id=89226
            > >
            > > It looks like the OS prefers to fill the swap instead of releasing the
            > > "unused" memory ...[/color]
            >
            > Ideally, you don't want the system to have to swap at all, and the
            > solution to that is add more RAM. Maybe you should increase your RAM up
            > to 1GB. If your system does not need to swap - then you will not to be
            > concerned about any "swap bug", as well as getting the better performance.[/color]

            Well, that's the problem. Even if you have 1Gb of RAM, it just
            doesn't use it and prefers to fill the swap!

            Comment

            • Benoit St-Jean

              #7
              Re: Swap usage on RH 9

              RodgerH <rodgerlee@yaho o.com> wrote in message news:<AHaec.140 46$So3.579346@t wister.southeas t.rr.com>...[color=blue]
              > Benoit St-Jean wrote:[color=green]
              > > I am wondering if the "swap bug" is present on my kernel/version of
              > > RedHat 9 as described at:
              > > http://bugzilla.redhat.com/bugzilla/...g.cgi?id=89226
              > >
              > > It looks like the OS prefers to fill the swap instead of releasing the
              > > "unused" memory ...[/color]
              >
              > Ideally, you don't want the system to have to swap at all, and the
              > solution to that is add more RAM. Maybe you should increase your RAM up
              > to 1GB. If your system does not need to swap - then you will not to be
              > concerned about any "swap bug", as well as getting the better performance.[/color]

              Well, that's the problem. Even if you have 1Gb of RAM, it just
              doesn't use it and prefers to fill the swap!

              Comment

              • Jan

                #8
                Re: Swap usage on RH 9

                bstjean@yahoo.c om (Benoit St-Jean) wrote in message news:<3540ac3e. 0404080552.62a7 3399@posting.go ogle.com>...[color=blue]
                > I am wondering if the "swap bug" is present on my kernel/version of
                > RedHat 9 as described at:
                > http://bugzilla.redhat.com/bugzilla/...g.cgi?id=89226
                >
                > It looks like the OS prefers to fill the swap instead of releasing the
                > "unused" memory and use the available RAM. This problem is especially
                > present when starting the MySQL server and executing lots of big
                > queries... Swap file grows and grows and is never released even
                > though there is available memory.[/color]

                I think it got fixed - when I switched to kernel 2.4.25 on my RH9, the
                hard drive stopped thrashing like crazy which is what it used to do
                any time I edited a very large image with GIMP.

                Jan Bielawski

                Comment

                • Jan

                  #9
                  Re: Swap usage on RH 9

                  bstjean@yahoo.c om (Benoit St-Jean) wrote in message news:<3540ac3e. 0404080552.62a7 3399@posting.go ogle.com>...[color=blue]
                  > I am wondering if the "swap bug" is present on my kernel/version of
                  > RedHat 9 as described at:
                  > http://bugzilla.redhat.com/bugzilla/...g.cgi?id=89226
                  >
                  > It looks like the OS prefers to fill the swap instead of releasing the
                  > "unused" memory and use the available RAM. This problem is especially
                  > present when starting the MySQL server and executing lots of big
                  > queries... Swap file grows and grows and is never released even
                  > though there is available memory.[/color]

                  I think it got fixed - when I switched to kernel 2.4.25 on my RH9, the
                  hard drive stopped thrashing like crazy which is what it used to do
                  any time I edited a very large image with GIMP.

                  Jan Bielawski

                  Comment

                  • Jan

                    #10
                    Re: Swap usage on RH 9

                    bstjean@yahoo.c om (Benoit St-Jean) wrote in message news:<3540ac3e. 0404080552.62a7 3399@posting.go ogle.com>...[color=blue]
                    > I am wondering if the "swap bug" is present on my kernel/version of
                    > RedHat 9 as described at:
                    > http://bugzilla.redhat.com/bugzilla/...g.cgi?id=89226
                    >
                    > It looks like the OS prefers to fill the swap instead of releasing the
                    > "unused" memory and use the available RAM. This problem is especially
                    > present when starting the MySQL server and executing lots of big
                    > queries... Swap file grows and grows and is never released even
                    > though there is available memory.[/color]

                    I think it got fixed - when I switched to kernel 2.4.25 on my RH9, the
                    hard drive stopped thrashing like crazy which is what it used to do
                    any time I edited a very large image with GIMP.

                    Jan Bielawski

                    Comment

                    Working...