Announcement

Collapse
No announcement yet.

[Feature Request] Ability to disable swap usage

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • [Feature Request] Ability to disable swap usage

    Hello,
    I know Cloudlinux use swap area as RAM, and you have tested this function. I know you say it works well, but on my system, there a lot of differences in speed time with CentOS and CloudLinux.

    CentOS use swap only if RAM is not enough, and its correct. Cloudlinux use swap if think that is better (with an algorithm I think).

    But on my system, with 50% of ram free (1GB on 2GB), usage of swap make all the system slow.

    I know you think its a great feature, and maybe it works well with a lot of servers, but please, add the ability to disable this thing, and make CloudLinux use swap only if really necessary.

    Thanks

  • #2
    CentOS will also use swap instead of purging disk caches in quite many cases. If you see your system being slow -- it is something else. It will not put things into swap if there is no pressure on a memory. The reason there are things in swap is that at some point there was no free memory, and instead of clearing disk caches being used, it put the programs into swap.
    And if you see your system slow, and free memory available and swap being used -- it is for sure not swap, as the programs swapped out -- are not being used at all at that time, and cannot cause slow down.

    Basically -- what I am saying -- something else is going on - and our support would be happy to investigate.

    Comment


    • #3
      Thank you for the reply, free -m says:

      total used free shared buffers cached
      Mem: 1869 1751 117 0 123 585
      -/+ buffers/cache: 1043 826
      Swap: 1999 447 1552

      Ive 826MB free, but the swap is used (427MB).

      Comment


      • #4
        No, you have 117MB free, the rest is used for disk caches/buffers, and given that swap is not being cleared out -- the programs that are in swap right now are sleeping, and not causing any issues...

        Comment


        • #5
          On servers with 8GB ram or more I reduce the swapiness because the système swaps depending the a percentage of total ram used.

          On servers with 32GB of ram or more we set swapiness to 0 to tell the système to only use swap when necessary.

          With only 2GB of ram I dont know if it would be a good idea to reduce swapiness…

          Comment


          • #6
            Swapiness is broken with CloudLinux. I have set it to 0 but i swap is always used even if there is enough memory free.

            Comment


            • #7
              Maybe it depends what the system concicers to be enough free memory.

              As you can see when you have enough free memory no swap is used :

              free -m
              total used free shared buffers cached
              Mem: 257905 114855 143050 0 23216 78340
              -/+ buffers/cache: 13299 244606
              Swap: 7576 0 7576

              Comment


              • #8
                True, but i prefer that swapiness value would be respected.

                Comment

                Working...
                X