System RAM wrongly reported in LXD container - No data
LocalAI version: v4.12.1
Environment, CPU architecture, OS, and Version: Windows + Docker Desktop WSL2.
Happens on localai/localai:latest-gpu-nvidia-cuda-12 or localai/localai:latest-gpu-nvidia-cuda-13
name: local-ai
services:
localai:
image: localai/localai:latest-gpu-nvidia-cuda-12
tty: true
stdin_open: true
container_name: local-ai
ports:
- 8081:8080
volumes:
- ./backends:/backends
- ./configuration:/configuration
- ./data:/data
- ./models:/models
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: all
capabilities: [gpu, compute, utility]
Describe the bug Memory doesn't match what top or /proc/meminfo says
top - 04:18:39 up 19 min, 0 user, load average: 1.41, 1.25, 1.03
Tasks: 3 total, 1 running, 2 sleeping, 0 stopped, 0 zombie
%Cpu(s): 0.1 us, 0.9 sy, 0.0 ni, 98.2 id, 0.0 wa, 0.0 hi, 0.8 si, 0.0 st
MiB Mem : 64293.4 total, 48330.5 free, 2726.3 used, 13888.3 buff/cache
MiB Swap: 4096.0 total, 4096.0 free, 0.0 used. 61567.2 avail Mem
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
1 root 20 0 9172920 211432 89248 S 18.3 0.3 2:23.38 ./local-ai
146 root 20 0 2812 1768 1664 S 0.0 0.0 0:00.02 /bin/sh
218 root 20 0 8952 5388 3220 R 0.0 0.0 0:00.05 top
# cat /proc/meminfo
MemTotal: 65836492 kB
MemFree: 49771336 kB
MemAvailable: 63329360 kB
Buffers: 113868 kB
Cached: 13675768 kB
SwapCached: 0 kB
Active: 394696 kB
Inactive: 13679128 kB
Active(anon): 3432 kB
Inactive(anon): 307788 kB
Active(file): 391264 kB
Inactive(file): 13371340 kB
Unevictable: 0 kB
Mlocked: 0 kB
SwapTotal: 4194304 kB
SwapFree: 4194304 kB
Dirty: 20 kB
Writeback: 0 kB
AnonPages: 284900 kB
Mapped: 347852 kB
Shmem: 26968 kB
KReclaimable: 435692 kB
Slab: 585784 kB
SReclaimable: 435692 kB
SUnreclaim: 150092 kB
KernelStack: 10688 kB
PageTables: 6552 kB
SecPageTables: 0 kB
NFS_Unstable: 0 kB
Bounce: 0 kB
WritebackTmp: 0 kB
CommitLimit: 37112548 kB
Committed_AS: 3001516 kB
VmallocTotal: 34359738367 kB
VmallocUsed: 42276 kB
VmallocChunk: 0 kB
Percpu: 14240 kB
HardwareCorrupted: 0 kB
AnonHugePages: 0 kB
ShmemHugePages: 0 kB
ShmemPmdMapped: 0 kB
FileHugePages: 18432 kB
FilePmdMapped: 0 kB
Unaccepted: 0 kB
Balloon: 0 kB
HugePages_Total: 0
HugePages_Free: 0
HugePages_Rsvd: 0
HugePages_Surp: 0
Hugepagesize: 2048 kB
Hugetlb: 0 kB
DirectMap4k: 64512 kB
DirectMap2M: 9371648 kB
DirectMap1G: 67108864 kB
#
Expected behavior Should see all the memory.
Additional context
I can confirm this on Devuan Linux with the latest docker image from quay.io for cuda 12.
For my case this was fixed with v5.0.0! Thanks
Did the RAM figure change for you in v5.0.0? Please share the value LocalAI shows and the output of free inside the container so we can compare.