1

I would say that my personal website is at least currently a "small" website.

It is a MediaWiki-based all-core website without images at all and of about 750 webpages of generally no more than 5,000 bytes each. By current principle it shouldn't pass the 1,000 webpages count.

If I had the right circumstance I would have run my website cacheless but I need caching for MediaWiki rate limiting.

I think that often times caching mechanisms can consume too many resources in comparison to a website (such as of myself?) and therefore cause more performance trouble than benefit in the long run.

My current hosting provider offers me Memcached which MediaWiki can utilize for Rate limiting but another hosting company offers me to choose between Memcached and APCu (which is also utilizable by MediaWiki for that cause). I don't know how to determine which should be lighter in generally every aspect, at least in my use case.

How to determine if APCu is overall lighter than Memcached in a use case?

Update

By lighter I mean "will consume significantly less computing resources", let along won't have any chance to badly effect my MediaWiki website

1
  • It's unclear what you mean by "lighter".
    – Tgr
    Mar 16 '21 at 17:43
0

Neither memcached nor APCu are going to consume significant computational (CPU) resources. Both of them consume storage space for their cache. Both of them have settings for how much storage space they can use. The difference between them is not about resources they consume. They both consume the resources that you configure them to consume.

The biggest differences is in how they work and where the cache resides.

  • Memcached is a network cache. You run a server and clients contact it over the network to cache data or retrieve from the cache. (I argue it is misnamed, it should be netcache. Although each instance does use memory rather than disk space to cache data.)
  • APCu is caching in the local memory of the server (no network involved.)

Memcached has the extra overhead of the network. But that also gives it flexibility. You can run the cache on a separate dedicated server. You can run multiple memcached servers to spread out a large cache. You can also have several web servers use the same cached data in a load balanced situation.

APCu is limited to using the available memory of a single web server. It can't share its cache with other servers.

For a small site when there is extra memory available on the web server, I'd go with APCu. If there isn't extra memory available, or if your site is on more than one sever, I'd go with Memcached.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.