Memcached Wasted Memory Is Very High

Discussion in 'Server Operation' started by jaypabs, Oct 26, 2022.

  1. jaypabs

    jaypabs Member

    I was using Memcached for a very long time and lately I noticed that the wasted memory is very high compared before.
    [​IMG]
    I don't know if this is because I am using master <> master replication or because of PHP version. I tested php7.4, 8.0 and 8.1 and having the same problem.
    I was thinking that this is the cause of high load on my server when I am using the "latest posts" widget of WordPress and "Query Loop" widget of GeneratePress theme in the sidebar of my site. It seems Memcached is not caching database. When I removed the latest posts or Query Loop widget, the server's load is back to normal.
    I've tried increasing the memory of memcache to 128mb, even to 2048mb to no avail.
    Anyone know what I am missing here? Why wasted is that so high?
     
  2. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    What does the "wasted" mean?
    From the posted image, my guess is there is 64 MB cache defined, of which 1,1 MB is used. The rest of the cache memory is unused, or "wasted". It seems there is nothing to put in the cache, so either something is wrong or memcache is unsuitable for this environment.
     
    ahrasis likes this.

Share This Page