• Resolved rensm

    (@rensm)


    Hi!

    I’ve migrated a webshop, that is having 2.3GB size of data in mysql. Added Redis Object cache and opcache and using this plug-in. But the CPU usage is quite a lot (90-100% of the 4 cores). I’ve uploaded a monitor under ID “DQT4mzYb”.

    Can someone have a look if one might see improvements on my end? buffer pool is set to 5GB, which uses 3GB currently. It’s a server with 4 vCPU cores and 16GB memory, Hosted at DigitalOcean.

    • This topic was modified 1 month, 2 weeks ago by rensm.
    • This topic was modified 1 month, 2 weeks ago by rensm.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author OllieJones

    (@olliejones)

    Thanks for the upload. I took a look. I don’t see anything in particular amiss. As is very common in WPML sites,. that localization software is database intensive.

    Your MySQL 8.0.39 server is very busy. 278 connections per second and 37K queries per second were handled in the 15 min of your monitor. (Assuming that workload is legitimate and not some silly runaway reporting process or something) it looks to me like your CPU usage is high because you’re doing useful work with it.

    Did it go up a lot after you added the high performance keys? If so, please let me know.

    A quick tip for you. The ubuntu apt package for redis, as installed, puts no limit on its RAM growth. I’ve had users where that default redis started hogging RAM and destabilizing MySQL (bad. bad.). You may want to put a couple of lines in /etc/redis/redis.conf . I use these settings on my 16GiB RAM development VM. You may want to allocate a smaller amount in maxmemory.

    maxmemory 256mb 
    maxmemory-policy allkeys-lfu
    Thread Starter rensm

    (@rensm)

    hi! Thanks for the tip.

    glad i’m not making any mistakes but it’s WPML… i’ve decided to switch over to multistore, where everything is seperated. Hopefully that will work!

    perhaps do you know, could the connections be bots? Or a plug-in that is constant connecting to database?

    Plugin Author OllieJones

    (@olliejones)

    I really don’t want to guess about where the connections are coming from. I have so little information you’d be better off with a Ouija board guess. If your site is busy, it’s possible all the database traffic is actual work for your audience and customers.

    If I were investigating it, I would start by logging in to MySQL as “root” and giving this SQL command;

    https://dev.mysql.com/doc/refman/8.0/en/show-processlist.html

    “Process” here means “connection”, close as makes no difference. I would eyeball the processes and try to figure out some kind of pattern. Let me know if I can help further.

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.