I've always installed apcu and memcached on my server, but I'm not sure how useful they are. Mostly 2-3 pages per visit are visited on my sites. And I'm not even sure if having them is a good thing or a bad thing, whether it's talking about SEO or consuming or saving server resources.
I would like to try to remove them and see what happens... But I find tons of guides on how to install them and none on how to remove them... so I have a few questions:
- is it possible to remove apcu and memcached?
- Most importantly is it possible to do it safely without destroying the server?
- and perhaps more importantly, is it such a stupid idea to remove them?
Additional information:
The server works fine, it has some spikes when a big cronjob starts (or when someone tries to attack it, but fail2ban takes care of it) but for the rest of the time it still has a lot of resources available. But slowly the memory fills up more and more, and everything is getting closer and closer to red, perhaps because of apcu or memcached?
The Short Answer:
is it possible to remove APCu and Memcached?
Yes
is it possible to do it safely without destroying the server?
Yes
is it such a stupid idea to remove them?
Well, it depends
The Longer one:
APCU
is just a PHP moduleMemcached
is an extra daemonWhat's Memcached
It will only Consume the Memory as defined down below (in my case 512mb) You have multiple options, on how to use and even to remove it. Due to I use Debian, the following one is the usually one.
BUT Remind, you have to remove that also from your Application. Else it can either break or do wired things.
Debian
This does not remove the Configs, you may want to add
--purge
to that above command to remove it completely.CentOS
In case you don't find the correct name, use
memcached.conf
Conclusion
Let's go again on your Point
It depends on the use case due to the fact it should improve the Performance. Even on my Smallest LXC Container (1CPU/128MB Ram), it is Possible, to run php-apc and memcached without problems. And Moreover, both “Caches” are limited by a Configuration item into the Maximum usage of RAM.
As Already stated, I still think that there might be a X-and-Y-Problem
Since you did not provide additional information at the moment, but 3 Questions. So far, I answered this at the moment of the current state.