Announcement

Announcement Module
Collapse
No announcement yet.

Usuage of Swap Space

Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Usuage of Swap Space

    Hi,

    On the mysql 5.0 linux 2.6 kernel . I see the RAM of 2.8 GB is used out of 3.0 GB. And the server slows down almost comes to a hang.

    when I do a free -m or top , I always see the Swap is hardly used or not used at all.

    Do I have to do something for the server to use the swap space and also how I can see if I have a swap file or partition.

    Thanks for any help.

  • #2
    You generally do not want to use the swap space.

    On databases where most of the allocated RAM is always used it is very bad to let the DB process get so big that the OS starts to use the swap.
    And the general rule is that it's better to use a bit less memory than risking that the OS starts to swap.

    So 2.8GB allocated out of 3G sounds very good.

    When your server starts to go slow does it have high CPU or high I/O load?

    Comment


    • #3
      when the server starts to slow there is high CPU.

      Thanks

      Comment


      • #4
        dvaddi wrote on Tue, 11 December 2007 03:27

        when the server starts to slow there is high CPU.

        Thanks

        Check out the slow query log.

        When the CPU usage is hight it usually means that you have some query that doesn't use an index for either a JOIN or for a ORDER BY.

        So turn on the slow query log and see if you can find the queries that takes longest time to perform and see if you can create proper indexes to solve these queries.

        Comment


        • #5
          Thanks for the help. I will check out that.

          Comment

          Working...
          X