Loading ...
Sorry, an error occurred while loading the content.

Swap priority

Expand Messages
  • dinil.dinil
    In our server we are facing performance issue. I am using Suse 9.Oracle is running on this server and always swap memory utilization is high. i found lot of
    Message 1 of 3 , May 18, 2009
    • 0 Attachment
      In our server we are facing performance issue. I am using Suse 9.Oracle is running on this server and always swap memory utilization is high. i found lot of dead/sleeping oracle process. Once we bounce the database swap memory is getting released. Now I found that the swap partition is 1GB and swap file is 3GB. In /etc/fstab swap partition priority is set to value 42 and for swap file it is set to value defaults. If we check the current priority in /proc/swaps both swap space is using the same priority(42).
      Is this the reason for high swap utilization?
      If I change the priority, it will resolve the issue or not?
    • Aaron Kulkis
      ... Define high ... so? Zombie processes take a very little amount of memory, only the line in the process table, and the return value. All of the rest of
      Message 2 of 3 , May 18, 2009
      • 0 Attachment
        dinil.dinil wrote:
        > In our server we are facing performance issue. I am
        > using Suse 9.Oracle is running on this server and
        > always swap memory utilization is high. i found lot

        Define "high"

        > of dead/sleeping oracle process.

        so?

        Zombie processes take a very little amount of memory,
        only the line in the process table, and the return value.
        All of the rest of the memory space allocated to the
        process is deallocated as soon as a process exit()s
        or abort()s

        Once the parent process reads the return value, then the
        zombie will be completely cleaned up.

        > Once we bounce the database swap memory is getting
        > released. Now I found that the swap partition is 1GB

        That's extremely small for a machine running a database.

        > and swap file is 3GB.


        a swap file? Ugh! why?

        Swap files are extremely SLOOOOOOOOOOOOOW -- the
        performanc hit is horrible.

        Oh, that's right..you only allocated 1 GB of swap partition.

        Save the database, and repartition your disk(s) properly.

        If you have multiple disks in the system, the put
        some of the swap space on one disk, and some on the
        other, and put them at the same priority -- this
        will improve system throughput immensely.

        Since you're already using 4 GB of swap, if you are
        using 1 disk, make a 6-GB swap partition. If you
        have 2 disks, make 2 3-GB swap partitions. If you
        have 3 disks, make 3 2-GB swap partitions.

        For optimal throughput, put all of these at the
        same priority -- then the swap system will treat
        them as if they are RAID 0 (striping).



        > In /etc/fstab swap partition priority is set to
        > value 42 and for swap file it is set to value
        > defaults. If we check the current priority in
        > /proc/swaps both swap space is using the same
        > priority(42).

        oh, a swap file should ALWAYS be lower priorit



        > Is this the reason for high swap utilization?

        Yes. It keeps your computer from crashing for lack of memory.

        Swap usage is data that has been loaded by the programs into
        memory, but then physical memory ran out, so it was moved
        out to swap space to make room for MORE data.

        If you buy more physical memory, swap utilization will be
        reduced.

        But that defeats the purpose of swap -- taking a
        slight performance hit by using the swap space as
        if it were memory (virtual memory)

        > If I change the priority, it will resolve the issue or not?


        No -- changing priority will NOT change the amount of
        swap being used. And if you had an adaquately sized
        swap partition (or partitions) -- AT LEAST 4 GB of
        swap partition (with any swap file being for an
        emergency overflow), then you would have a much
        faster swapping performance (provided that the
        swap partition has a higher priority (higher number)
        than the swap file.
      • dinil.dinil
        Thanks Aaron....
        Message 3 of 3 , May 20, 2009
        • 0 Attachment
          Thanks Aaron....
        Your message has been successfully submitted and would be delivered to recipients shortly.