Re: [gdal-dev] GDAL Overestimating Physical Memory

2023-01-26 Thread Angus Dickey
Even, I pulled the updated PR and it is working well in a Linux container: $ ./get_gdal_memory GDAL version is 3.7.0dev GDAL thinks it has 2097152000 bytes of physical memory GDAL thinks it has 2097152000 bytes of usable physical memory sysinfo() thinks it has 811526475776 bytes of physical mem

Re: [gdal-dev] GDAL Overestimating Physical Memory

2023-01-26 Thread Laurențiu Nicola via gdal-dev
On Thu, Jan 26, 2023, at 16:52, Even Rouault wrote: > Laurențiu, > > are you 100% positive you've tested the updated version of the pull request? > I've just given a try to running gdallimits under Docker from a Ubuntu 22.04 > host and it successfully takes into account the /sys/fs/cgroup/memo

Re: [gdal-dev] GDAL Overestimating Physical Memory

2023-01-26 Thread Even Rouault
Angus, I've just edited the pull request to take into account MemTotal of /proc/meminfo. Only tested on my host Linux, but hopefully that should work also for your setup given the elements you've mentionned. Laurențiu, are you 100% positive you've tested the updated version of the pull requ

Re: [gdal-dev] GDAL Overestimating Physical Memory

2023-01-25 Thread Laurențiu Nicola via gdal-dev
Hello, I also managed to reproduce this in Docker (4 GB limit): # cat /proc/self/cgroup 0::/ # cat /sys/fs/cgroup/memory.max 4294967296 # autotest/cpp/gdallimits CPLGetNumCPUs = 32 CPLGetUsablePhysicalRAM = 62 GB (podman behaves exactly the same) Laurentiu On Thu, Jan 26, 2023, at 03:13, Ang

Re: [gdal-dev] GDAL Overestimating Physical Memory

2023-01-25 Thread Angus Dickey
Even, Thanks, that is some quick turn around! I imagine Proxmox or LXD are pretty much what everyone uses to create linux containers. LXC is the underlying technology but also has a set of command line tools that can be

Re: [gdal-dev] GDAL Overestimating Physical Memory

2023-01-25 Thread Even Rouault
Angus, I'm not familiar with LXC. I tried to setup LXD with https://linuxcontainers.org/lxd/introduction/ but it fails with a mysterious "Error: Failed to create local member network "lxdbr0" in project "default": Failed generating auto config: Failed to automatically find an unused IPv4 subn

Re: [gdal-dev] GDAL Overestimating Physical Memory

2023-01-24 Thread Angus Dickey
Even, Thanks for the reply, I went ahead and compiled the latest GDAL 3.6.2 on Ubuntu 22.04. Unfortunately I ended up with a similar result, GDAL thinks it has 755GB of RAM to work with when it only has 2GB: $ gdalinfo --version GDAL 3.6.2, released 2023/01/02 (debug build) $ ./get_gdal_memory

Re: [gdal-dev] GDAL Overestimating Physical Memory

2023-01-24 Thread Even Rouault
Angus, there has been a recent extra fix that landed in GDAL 3.6.2 that might possibly help: https://github.com/OSGeo/gdal/pull/6926 Even Le 25/01/2023 à 01:36, Angus Dickey a écrit : Hi all, I am running into an issue where GDAL is overestimating the amount of physical memory it has leadi

[gdal-dev] GDAL Overestimating Physical Memory

2023-01-24 Thread Angus Dickey
Hi all, I am running into an issue where GDAL is overestimating the amount of physical memory it has leading to it locking up the OS by taking 100% of the memory. Here is an example program that illustrates the issue: #include #include "gdal.h" int main(void) { printf("GDAL version is %s\n",