High memory usage



  • Hey, i have 4gb ram in my pfSense box, and its basically just a transparent proxy.

    I know squid uses a fair bit of memory, but my system seems to be always around 90% memory usage, and also 3% swap usage.. is this bad?



  • Hi,

    SWAP file ist bad because this slow down the squid process.

    How much hard disk cache did you assign to squid ?
    How much memory did you assign to squid ?
    How much memory do you have installed on your pfsense machine ?

    In general it is normal and no problem when you are running squid and much RAM is used. But the RAM usage shouldn't be higher than ~80% I think. You have to remember:
    When you assign 1GB RAM for squid, than this is the MINIMUM squid is using. squid always uses more RAM because you need additional RAM for every GB of hard disk cache.



  • And how can you solve the swap file issue, mine is always 0%.



  • @yohansc:

    And how can you solve the swap file issue, mine is always 0%.

    Lower your RAM and/or corresponding to this the HDD cache size.
    If there isn't enough RAM for squid than squid has two possibilities: SWAP or die.


  • Rebel Alliance Developer Netgate

    Free RAM is wasted RAM. If the system is just using it for caching and whatnot, that's better than letting it sit empty.

    Run top -SH for a bit and see what the memory breakdown looks like there.


Log in to reply