E
E
Eugene2017-02-27 12:24:50
caching
Eugene, 2017-02-27 12:24:50

Caching. In what cases should it be applied?

Tell me who really came across, tested caching. Pros, cons, when it makes sense to apply, when not?
We are mainly interested in time parameters (for example, if we save > 0.1 sec, that is, it makes sense to cache to a file), as well as what problems come out.
1. When should file caching on SSD be used? (cache file size, allowable number of files in a folder)
For me, with the number of files in the cache 35000, the site is loaded in 2 seconds instead of 1 sec. After clearing the cache, everything speeds up again.
2. Caching in the database (data size). On this type of caching I did not find anything at all. Table for example md5 text time. Who really tried / came across, does it make sense and in what cases, how much does extra INSERT, DELETE, etc. affect the speed of the database.
3. When does it really make sense to cache? (how much time should we save for this to make sense)
4. Compressing data before saving it to the cache, is there any sense and when?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dimonchik, 2017-03-01
@dimonchik2013

any computer has three parameters:
memory
loading loading of the processor
loading the IO of the Disk
to reduce the IO use memory, and to make it fit more -
think of them as coordinate axes, then the box built on them will be a measure of performance
software task - a box of maximum volume (such as in ideally a cube, but this does not happen)
therefore it all depends on the project and the data used
1) nginx applies and so
2) in the database there is a cache of frequent requests (essno answers), the insert affects. The database is generally a huge layer of knowledge and experience, there are no simple answers
3) time depends on the business, for this, 10Gbps channels are taken by anyone who needs it. Who does not need it - will wait and 2s
4) loading a processor, usually has - the percentage for the web is the least loaded, but the data may not be unpacked)) there - gzip pages
are all on one machine
when a cluster of at least two or three is built, everything can change

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question