Announcement

Collapse
No announcement yet.

Mesa's Shader Cache Will Now Occupy Less Disk Space

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #11
    Is it hardcoded or not? Is it possible to simply change some config file?
    Can i choose % or MB/GB?
    Can i choose device for this cache?

    Comment


    • #12
      Originally posted by sunweb View Post
      Can i choose device for this cache?
      Seconded. I have a large HDD and a relatively small boot SSD.

      Comment


      • #13
        Originally posted by Xicronic View Post

        Seconded. I have a large HDD and a relatively small boot SSD.
        nvidia uses the home dir... what does mesa use?

        Comment


        • #14
          Originally posted by cj.wijtmans View Post

          nvidia uses the home dir... what does mesa use?
          Phoronix, Linux Hardware Reviews, Linux hardware benchmarks, Linux server benchmarks, Linux benchmarking, Desktop Linux, Linux performance, Open Source graphics, Linux How To, Ubuntu benchmarks, Ubuntu hardware, Phoronix Test Suite


          Could just symlink ~/.cache/mesa to a different location/disk.
          Michael Larabel
          https://www.michaellarabel.com/

          Comment


          • #15
            Originally posted by Michael View Post

            http://www.phoronix.com/scan.php?pag...er-cache&num=1

            Could just symlink ~/.cache/mesa to a different location/disk.
            In this case will it determine that it needs to eat 5% of the disk its actually on and not the symlinked one?

            EDIT

            Example:
            sda1 - 100 GB home is here as well as the symlink to mesa cache
            sdb1 - 10 GB the actual mesa cache is here
            Will Mesa cache use 5% of 100 GB drive or 5% of 10 GB?
            Last edited by sunweb; 27 April 2017, 01:24 PM.

            Comment


            • #16
              Originally posted by Nille_kungen View Post
              The very first SSD had those problems but now it's a thing from the past that many think still is present.
              I do think 5% is very much, if i have an 3TB hdd then 5% is to much and it should have an max limit rather the %.
              I haven't played with shader cache and don't know how much it will use and how fast, i only thought 5% can be a very vast amount och space.
              They need to put some hardcoded maximum amount in. There's no reason to have the cache go higher than 25GB (or insert whatever limit you want), and that's easily hit with any kind of percentage based scheme. A percentage can make sense for anything under that.

              Comment


              • #17
                It's only 5% of the filesystem, such as /home, where the cache is located and not the whole disk (unless you foolishly have everything under a single / filesystem). If you symlink /home/user/.cache/mesa to a another filesystem then it'll be 5% of it instead.

                The initial 10% value was in consideration of a 100GB /home filesystem versus the Dolphin emulator apparently needing 6GB for shader cache (before compression was added but still sounded too big to me).

                The cache location can be overridden with MESA_GLSL_CACHE_DIR and the cache size with MESA_GLSL_CACHE_MAX_SIZE environment variables.

                Comment


                • #18
                  Same ugly hack of the minimum space that has to be allocated for root user on ext4 (by default anyway), also on data drives because lolwhut?.

                  It needs to look at free space or if that's too complex for a driver (don't know), then just have a table of pre-set values, like if < 200GB then it is X GB, if >200GB but <1TB then it is Y GB and so on.

                  Also having a relatively smart algorithm for deleting older ones would be cool but again it's probably overkill.

                  Comment


                  • #19
                    Originally posted by Reiver View Post
                    It's only 5% of the filesystem, such as /home, where the cache is located and not the whole disk (unless you foolishly have everything under a single / filesystem).
                    "foolishly have everything under a single / filesystem"?

                    please tell me more about the "foolish" part.

                    Comment


                    • #20
                      Originally posted by cj.wijtmans View Post
                      nvidia uses the home dir... what does mesa use?
                      Dependes on the environment variables set:
                      if MESA_GLSL_CACHE_DIR is set it will use exactly this path.
                      if MESA_GLSL_CACHE_DIR is not set but XDG_CACHE_HOME is set, it will use XDG_CACHE_HOME/mesa.
                      if MESA_GLSL_CACHE_DIR and XDG_CACHE_HOME are not set it will use ~/.cache/mesa

                      Originally posted by sunweb View Post
                      Is it hardcoded or not? Is it possible to simply change some config file?
                      Can i choose % or MB/GB?
                      Can i choose device for this cache?
                      You can use MESA_GLSL_CACHE_MAX_SIZE environment variable.
                      It will accept a number followed by 'G', 'M' or 'K' to set the max size to GiB, MiB or KiB. Use MESA_GLSL_CACHE_DIR to set the path to the cache.

                      Example:
                      MESA_GLSL_CACHE_MAX_SIZE=25G will limit to 25GiB.
                      MESA_GLSL_CACHE_DIR=/mnt/somedrive/mesa will pit the cache to '/mnt/somedrive/mesa'
                      Last edited by droste; 27 April 2017, 01:59 PM.

                      Comment

                      Working...
                      X