Title. Besides setting tmpfs to use 10GiB of it to store downloads.

    • GustavoM@lemmy.worldOP
      link
      fedilink
      English
      arrow-up
      5
      ·
      edit-2
      1 year ago

      Does it improve performance in any way? Seems a bit obvious, but I’ll ask anyways for the sake of curiosity.

      • Acters@lemmy.world
        link
        fedilink
        arrow-up
        4
        ·
        1 year ago

        Yes, and if you have an ssd, it will decrease the amount of usage that the limited(albeit ridiculously high) read/write cycles the ssd is capable of. However, it is unlikely you will hit those limits with that kind of usage, lol

        Also, memory is faster always, but your usage is negligible. You can disable swap(linux/mac) or page file(windows) to force memory to be used, and your drive is used less. Firefox can be configured to disable disk cache and increase ram cache. Also, it will be noted that this cache is marked as temporary ram cache. any application that needs more ram can delete the temp cache for usage(dynamic ram usage)

        But that’s it. The best thing to do is live your life and be happy that you are future proofed for any task that may arise.

      • kevincox
        link
        fedilink
        arrow-up
        1
        ·
        1 year ago

        Like anything it depends. If you are just mounting a tmpfs over .cache then probably not. It will likely harm performance overall because you will have an empty cache after every boot.

        If you are copying the existing files to the tmpfs and then doing the flushing them back to disk on shutdown then you are essentially “preaching” the data at startup. Done at an appropriate priority this can make initial accesses faster with minimal impact on startup time. However if you don’t have swap this may harm long-running performance as the kernel has to keep .cache in RAM even if caching other files and data would be more beneficial. If you do have swap then you are doing needless writes to swap to save this data that is already on disk. Overall it would probably be better to run some command that reads all of the data at bootup to warm up the page cache then let the kernel manage it for you.

        So in general no, this isn’t a great idea. The kernel will track what files are being used and cache them intelligently, using access patterns rather than a very simply policy like “is in .cache”. This really only helps if you need really consistent performance out of you cache folder, but in practice this will probably come at the cost of less predictably performance of other data.

        TL;DR The kernel caches your disk using the observed access patterns, unless you are putting significant ongoing effort into careful tuning it will probably do a better job than you will.