Swpd and Free Memory [duplicate]












2
















This question already has an answer here:




  • Why is swap being used even though I have plenty of free RAM?

    6 answers




I'm tryng to stress a web server with requests, I used vmstat to get the memory usage of the server, but I don't understand few things.




  1. When the requests start, the free memory decreases and the swpd increases, but after a while, even if the requests continue at the same rate, the free memory goes up. I think it's because the system goes out of free memory, or at least to avoid that before it's to late, allocates new memory with swap memory, am I right?

  2. Is there a way to limit the swap memory allocation?


Memory Usage Compared










share|improve this question















marked as duplicate by Fabby, karel, Charles Green, Eric Carvalho, user68186 Feb 6 at 15:42


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.



















  • 1) Could you add the graph for mem used by application too ? 2) Why do you want to reduce swap allocation ? Do you have bad performance ?

    – Soren A
    Feb 2 at 16:57











  • 1) Unfortunately no 2) I want to test the performances without the swap memory

    – simone bianco
    Feb 2 at 17:01













  • As long as you have free memory swap doesn't impact performance in any way. But if you wan't, you can disable swap bu running sudo swapoff -a

    – Soren A
    Feb 2 at 17:07











  • Perfect thanks. Also is there a way to set a specific dimension, same for buffer?

    – simone bianco
    Feb 2 at 17:52
















2
















This question already has an answer here:




  • Why is swap being used even though I have plenty of free RAM?

    6 answers




I'm tryng to stress a web server with requests, I used vmstat to get the memory usage of the server, but I don't understand few things.




  1. When the requests start, the free memory decreases and the swpd increases, but after a while, even if the requests continue at the same rate, the free memory goes up. I think it's because the system goes out of free memory, or at least to avoid that before it's to late, allocates new memory with swap memory, am I right?

  2. Is there a way to limit the swap memory allocation?


Memory Usage Compared










share|improve this question















marked as duplicate by Fabby, karel, Charles Green, Eric Carvalho, user68186 Feb 6 at 15:42


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.



















  • 1) Could you add the graph for mem used by application too ? 2) Why do you want to reduce swap allocation ? Do you have bad performance ?

    – Soren A
    Feb 2 at 16:57











  • 1) Unfortunately no 2) I want to test the performances without the swap memory

    – simone bianco
    Feb 2 at 17:01













  • As long as you have free memory swap doesn't impact performance in any way. But if you wan't, you can disable swap bu running sudo swapoff -a

    – Soren A
    Feb 2 at 17:07











  • Perfect thanks. Also is there a way to set a specific dimension, same for buffer?

    – simone bianco
    Feb 2 at 17:52














2












2








2









This question already has an answer here:




  • Why is swap being used even though I have plenty of free RAM?

    6 answers




I'm tryng to stress a web server with requests, I used vmstat to get the memory usage of the server, but I don't understand few things.




  1. When the requests start, the free memory decreases and the swpd increases, but after a while, even if the requests continue at the same rate, the free memory goes up. I think it's because the system goes out of free memory, or at least to avoid that before it's to late, allocates new memory with swap memory, am I right?

  2. Is there a way to limit the swap memory allocation?


Memory Usage Compared










share|improve this question

















This question already has an answer here:




  • Why is swap being used even though I have plenty of free RAM?

    6 answers




I'm tryng to stress a web server with requests, I used vmstat to get the memory usage of the server, but I don't understand few things.




  1. When the requests start, the free memory decreases and the swpd increases, but after a while, even if the requests continue at the same rate, the free memory goes up. I think it's because the system goes out of free memory, or at least to avoid that before it's to late, allocates new memory with swap memory, am I right?

  2. Is there a way to limit the swap memory allocation?


Memory Usage Compared





This question already has an answer here:




  • Why is swap being used even though I have plenty of free RAM?

    6 answers








server ram swap






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Feb 2 at 16:56









Mr Shunz

2,49121922




2,49121922










asked Feb 2 at 16:51









simone biancosimone bianco

132




132




marked as duplicate by Fabby, karel, Charles Green, Eric Carvalho, user68186 Feb 6 at 15:42


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.









marked as duplicate by Fabby, karel, Charles Green, Eric Carvalho, user68186 Feb 6 at 15:42


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.















  • 1) Could you add the graph for mem used by application too ? 2) Why do you want to reduce swap allocation ? Do you have bad performance ?

    – Soren A
    Feb 2 at 16:57











  • 1) Unfortunately no 2) I want to test the performances without the swap memory

    – simone bianco
    Feb 2 at 17:01













  • As long as you have free memory swap doesn't impact performance in any way. But if you wan't, you can disable swap bu running sudo swapoff -a

    – Soren A
    Feb 2 at 17:07











  • Perfect thanks. Also is there a way to set a specific dimension, same for buffer?

    – simone bianco
    Feb 2 at 17:52



















  • 1) Could you add the graph for mem used by application too ? 2) Why do you want to reduce swap allocation ? Do you have bad performance ?

    – Soren A
    Feb 2 at 16:57











  • 1) Unfortunately no 2) I want to test the performances without the swap memory

    – simone bianco
    Feb 2 at 17:01













  • As long as you have free memory swap doesn't impact performance in any way. But if you wan't, you can disable swap bu running sudo swapoff -a

    – Soren A
    Feb 2 at 17:07











  • Perfect thanks. Also is there a way to set a specific dimension, same for buffer?

    – simone bianco
    Feb 2 at 17:52

















1) Could you add the graph for mem used by application too ? 2) Why do you want to reduce swap allocation ? Do you have bad performance ?

– Soren A
Feb 2 at 16:57





1) Could you add the graph for mem used by application too ? 2) Why do you want to reduce swap allocation ? Do you have bad performance ?

– Soren A
Feb 2 at 16:57













1) Unfortunately no 2) I want to test the performances without the swap memory

– simone bianco
Feb 2 at 17:01







1) Unfortunately no 2) I want to test the performances without the swap memory

– simone bianco
Feb 2 at 17:01















As long as you have free memory swap doesn't impact performance in any way. But if you wan't, you can disable swap bu running sudo swapoff -a

– Soren A
Feb 2 at 17:07





As long as you have free memory swap doesn't impact performance in any way. But if you wan't, you can disable swap bu running sudo swapoff -a

– Soren A
Feb 2 at 17:07













Perfect thanks. Also is there a way to set a specific dimension, same for buffer?

– simone bianco
Feb 2 at 17:52





Perfect thanks. Also is there a way to set a specific dimension, same for buffer?

– simone bianco
Feb 2 at 17:52










1 Answer
1






active

oldest

votes


















2















  1. No: Free memory is unused memory: you're not going out of memory at all.

  2. It's possible, but a bad idea: the kernel knows better than you when to use swap... ;-)


For more information on how the kernel uses memory, have a look here.






share|improve this answer
































    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    2















    1. No: Free memory is unused memory: you're not going out of memory at all.

    2. It's possible, but a bad idea: the kernel knows better than you when to use swap... ;-)


    For more information on how the kernel uses memory, have a look here.






    share|improve this answer






























      2















      1. No: Free memory is unused memory: you're not going out of memory at all.

      2. It's possible, but a bad idea: the kernel knows better than you when to use swap... ;-)


      For more information on how the kernel uses memory, have a look here.






      share|improve this answer




























        2












        2








        2








        1. No: Free memory is unused memory: you're not going out of memory at all.

        2. It's possible, but a bad idea: the kernel knows better than you when to use swap... ;-)


        For more information on how the kernel uses memory, have a look here.






        share|improve this answer
















        1. No: Free memory is unused memory: you're not going out of memory at all.

        2. It's possible, but a bad idea: the kernel knows better than you when to use swap... ;-)


        For more information on how the kernel uses memory, have a look here.







        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited Feb 3 at 15:09

























        answered Feb 2 at 19:23









        FabbyFabby

        26.9k1360161




        26.9k1360161















            Popular posts from this blog

            How to make a Squid Proxy server?

            第一次世界大戦

            Touch on Surface Book