[gdal-dev] GDAL_CACHMAX on a docker container
Guy Doulberg
guyd at satellogic.com
Wed May 23 04:28:51 PDT 2018
I opened and issue:https://github.com/OSGeo/gdal/issues/640
Can you check in your docker container that
> cat /sys/fs/cgroup/memory/memory.limit_in_bytes
> returns the maximum memory amount you specified ?
>
yes it returns the memory I specified
On Wed, May 23, 2018 at 1:53 PM, Robert Coup <robert.coup at koordinates.com>
wrote:
> Hi,
>
> On 23 May 2018 at 11:48, Even Rouault <even.rouault at spatialys.com> wrote:
>
>>
>> There are some hints to how this could be done:
>> https://github.com/dotnet/coreclr/blob/master/src/gc/unix/cgroup.cpp
>> https://stackoverflow.com/questions/42187085/check-mem-limit
>> -within-a-docker-container
>>
>> I just tried
>>
>> $ docker run --memory 512m --rm -it ubuntu bash
>>
>> root at 0ae673d96789:/# cat /sys/fs/cgroup/memory/memory.limit_in_bytes
>> 536870912
>>
>> Can you check in your docker container that
>> cat /sys/fs/cgroup/memory/memory.limit_in_bytes
>> returns the maximum memory amount you specified ?
>>
>
> Was just posting the same thing.
>
> Yes, that approach works, and that's how the JVM does it now (
> https://bugs.openjdk.java.net/browse/JDK-8170888), and others.
>
> If there's no memory limit set you get (on 64-bit linux)
> 9223372036854771712, currently recommendation is to take the minimum of the
> total system memory (eg. /proc/meminfo) and the cgroups
> memory.limit_in_bytes
>
> Rob :)
>
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/gdal-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20180523/860d7c40/attachment.html>
More information about the gdal-dev
mailing list