K
K
Konstantin Khairov2019-07-20 19:15:38
Nginx
Konstantin Khairov, 2019-07-20 19:15:38

Is it possible to throw 4 MB of video (the beginning of the file) into the RAM cache?

Here is the question. Is it possible, for example, to throw the first 3-4 MB of a video file into RAM so that nginx immediately and quickly gives it away and then loads everything else from the disk?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
R
Ronald McDonald, 2019-07-20
@Zoominger

Frequently used Files OS itself will place in the cache.

R
rPman, 2019-07-20
@rPman

Do you need it in advance?
A separate application that will run through the necessary files and read the necessary piece (I advise not only the beginning but also the end, in avi, for example, there are indexes, they are also read immediately). You can even read several times (including periodically) to convince a smart cache that counts statistics (if there is one, usually there is just a fifo queue) that these data are of more interest to you and would remain in the cache longer.
True, it is not clear how you will determine in advance which files you need to make friends and which not, and if everything is, then there may not be enough RAM.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question