hitting IO threshold in shared hosting
-
I discovered this plugin some weeks ago, when I researched the WP-warning “you should use a persistent object cache” and your plugin seems to work wonders, specifically for pages that’re (rightfully) not cached by WPRocket, such as almost all Woo-pages and most of the WP-backend. THANK YOU!
Alrighty, here’s my problem, though: the default cache size is set to 16megs. After some time, however, the actual disk consumption can grow bigger than that. I discovered this, when WP warned me about response times above 600msecs, which I of course ignored / mistook as a measurement glitch. But then only hours later my hoster sent an email saying that my resource consumption is through the roof … and that is when I woke up.
Turns out, disk-IO hit several times per minute >40 megs / sec, which apparently hits my hosting companies nerves. As a result, my site was being throttled (=> >600msecs). I discovered that .ht-object-cache.sqlite had grown to almost 44megs, which seemed a reasonable enough culprit. So I ran “Clean up now”, which didn’t change the file size, though. Next, I ran a “Flush Now”, which brought the file size to 0 and disk-IO fell immediately and drastically … back to normal.
Now, looking at the code, a full vacuum is only run alongside flushes. But that seems to happen on demand only. Meantime, my sqlite-file size already has already grown back to over 35 megs inside of 8 hours. So, I guess, I will be hitting this problem again, quite soon actually.
So, how would I approach this? I feel like, reducing the cache size is not an option, because db-fragmentation is created by deleting rows and inserting new ones, i.e. the “final” file size is probably correlated with the turnover of outdated cache records rather than the initial cache size. Alternatively, I could run a scheduled full vacuum. Maybe the plugin could even do this alongside the hourly background cleanup. Or maybe …. I am getting ahead of myself and should rather ask somebody, who knows stuff. ??
Kind regards,
Uwe
- You must be logged in to reply to this topic.