[gdal-dev] Way to increase global LRU cache of the /vsis3/ driver
even.rouault at spatialys.com
Tue Jun 13 08:34:05 PDT 2017
On mardi 13 juin 2017 08:24:59 CEST teeschke wrote:
> Dear GDAL Devs,
> the vsis3 driver truly is a masterpiece of a driver!!
> I just wonder if there is any possibility to increase the global LRU cache
> which has a fixed size of 16MB.
> In my use-case I have time-related Gribfiles, stored on S3. The timestamp is
> part of the filename. The front-end uses _tiles_ and has an _animation_
> functionality. That ends up in lots of data accesses from Mapserver to S3
> and I hope that increasing the global LRU cache to 2GB would be a
> performance kick.
static const int N_MAX_REGIONS = 1000;
static const int N_MAX_REGIONS = 122070;
(122070 * 16384 ~= 2 GB)
However the algorithm that handles cached region eviction/lookup might exhibit bad
performance with such a big numbers since it is rather native right now, so I'd suggest you to
test carefully. It should probably use a hashset rather than an array.
Ultimately I'd like that this setting to be user tunable, so might be worth that you file an
enhancement ticket at https://trac.osgeo.org/gdal/newticket
Spatialys - Geospatial professional services
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the gdal-dev