3 ms·
Linux already caches files in ram, you're probably just doing something that your OS is already doing, but worse. If you're really concerned you can MMAP the f
by traverseda 3y ago
Linux already caches files in ram, you're probably just doing something that your OS is already doing, but worse.
If you're really concerned you can MMAP the file instead, and do a read every once in a while to keep it cached.
There are a lot of cases where this kind of functionality could cause big problems, and very few where it has more than a marginal improvement over what your OS is already doing. Just read the file every once in a while to keep it in memory cache.
- antihero 3y agoThis doesn’t necessarily have to run on Linux.