Is memcache proof faster than file system caching?

Is there any theory that says the cache should be faster than the file system?

I think that since the file system also uses caching, there is no scientific evidence that we should move content from the file system to the cache, such as memcache, when the concept of the file system is somewhat weakened - for example, loading a โ€œfileโ€ may be the same as loading memcached object.

My specific example is to host the template engine through memcache or the file system. Does it matter?

+4
source share
2 answers

In most cases, your file system will be faster. For instance. when you need a cache for your "compiled templates", the file system will be faster.

And caching the file system (especially on Linux) will ensure that your cached templates, which are read frequently, are available in a very short time. The kernel stores them in a cache in memory, and reading will be fast as hell.

memcached is a distributed key / value store. It has various use cases .

+8
source

Read the memcached about page to see why memcached exists. Your question does not make sense if you do not have a magic clustered file system cache for your 100 front-end web servers.

+4
source

Source: https://habr.com/ru/post/1369039/


All Articles