You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using zdb v2.0.2 static I could upload 34 GB of data (116,850 entries) and zdb was using 139 MB memory.
What's your limit ?
There is maybe a memory issue somewhere else than normal operation. This test was made while uploading chunks for hub. It's possible that some memory issue occurs with INDEX DIRTY. I'll do more test with zstor.
It's possible that it's a cache problem and the memory is allocated as a cache and not directly by zdb. From the OOM logs, the vm (virtual memory) used is about ~143MB, but "file" metric is ~281MB. The cgroup of the container running zdb has these data:
I also think the buf/cache is freed if needed, because they are just used by the kernel to improve performance of file access. But if needed, data will be flushed to disk and then allocated to the process. Not the other way around.
hashmem also OOMs, zdb process restarts occasionally using 32M as datasize but not because of OOM (no dmesg logs, and container logs are truncated, segfault?).
Not reproducible with me locally at all, started the zos vm on an hdd and the usage (rss + cache) always oscillates a little bit behind the limit just like in the nodes' case but it never gets killed.
Stracing the original zdb version process while it's operating to check what it's doing at the end, causes it to not be killed by OOM!
Tried to make another image which pushes its logs to some files to prevent it from being truncated. The store command fulfillment rate became much slower and the processes piled up causing the qsfs container zstor to be OOMed, but the zdb container didn't misbehave at all (except for being slow?). Chuncking the writes to cope with the slow rate didn't result in any OOM or crash.
OOM logs with stacktrace and registers (for hashmem):
If I understand correctly from the logs, it failed because of a write syscall (with 2MB data?), and the total-vm indicates the process part is just ~16MB.
It's possible to get segfault on hashmem, it's still in testing stage.
Did you tried to reproduce it with cgroup memory limits ?
There is a specific sync call on file rotation. I don't know if the stacktrace talk about a write or a sync, it's btrfs related.
I don't know what's exactly take in account for computing memory usage, if storage cache (eg: btrfs cache) is computed as well, that will be a problem and we need some btrfs locally to compare too.
Activity
maxux commentedon Jan 14, 2022
Using
zdb v2.0.2 staticI could upload34 GBof data (116,850entries) and zdb was using139 MBmemory.What's your limit ?
There is maybe a memory issue somewhere else than normal operation. This test was made while uploading chunks for hub. It's possible that some memory issue occurs with
INDEX DIRTY. I'll do more test with zstor.OmarElawady commentedon Jan 17, 2022
The limit is 256MB on zos and it only has the zdb process in the container (on which the limit is applied).
OmarElawady commentedon Jan 18, 2022
It's possible that it's a cache problem and the memory is allocated as a cache and not directly by zdb. From the OOM logs, the vm (virtual memory) used is about ~143MB, but "file" metric is ~281MB. The cgroup of the container running zdb has these data:
from the cgroup memory stats documentation 5.5. The usage is rss+cache (the usage_in_bytes file is an approx.).
OOM logs:
muhamadazmy commentedon Jan 18, 2022
I also think the buf/cache is freed if needed, because they are just used by the kernel to improve performance of file access. But if needed, data will be flushed to disk and then allocated to the process. Not the other way around.
maxux commentedon Jan 18, 2022
Some things to investigate:
32M? By default, datafile are split on256M.development-v2-hashmembranch, which not allocate a static128MbufferOmarElawady commentedon Jan 31, 2022
hashmem also OOMs, zdb process restarts occasionally using 32M as datasize but not because of OOM (no dmesg logs, and container logs are truncated, segfault?).
Not reproducible with me locally at all, started the zos vm on an hdd and the usage (rss + cache) always oscillates a little bit behind the limit just like in the nodes' case but it never gets killed.
Stracing the original zdb version process while it's operating to check what it's doing at the end, causes it to not be killed by OOM!
Tried to make another image which pushes its logs to some files to prevent it from being truncated. The store command fulfillment rate became much slower and the processes piled up causing the qsfs container zstor to be OOMed, but the zdb container didn't misbehave at all (except for being slow?). Chuncking the writes to cope with the slow rate didn't result in any OOM or crash.
OOM logs with stacktrace and registers (for hashmem):
If I understand correctly from the logs, it failed because of a write syscall (with 2MB data?), and the
total-vmindicates the process part is just ~16MB.maxux commentedon Jan 31, 2022
Thanks !
It's possible to get segfault on hashmem, it's still in testing stage.
Did you tried to reproduce it with cgroup memory limits ?
There is a specific sync call on file rotation. I don't know if the stacktrace talk about a write or a sync, it's btrfs related.
I don't know what's exactly take in account for computing memory usage, if storage cache (eg: btrfs cache) is computed as well, that will be a problem and we need some btrfs locally to compare too.
OmarElawady commentedon Jan 31, 2022
The zdb restarting occasionally is the latest with 32MB (not sure why as the logs are truncated).
The memory limit is set on the node eventually using cgroups. But wasn't able to reproduce outside the node with:
I guessed the syscall from table.
ORIG_RAXequals to 1.Edited the oom logs with a missing line at the beginning containing gfp_mask, might be useful.