EDIT: Given link of another thread suggest that newer kernel do not have this issue but I am using latest kernel i.e. 4.18.5. Hence, this issue is either new or newer kernel have this bug
In my setup, I need to mount least 200 Loop devices. Mounting 200+ loop device is not an issue. But I observed that mounting 200+ devices eats up almost 300+ MB of RAM. All these loop devices are of squashfs type. Few devices are of size 1MB while few are of 50+MB.
top command also don't show anything about RAM consumption.
echo 3 > /proc/sys/vm/drop_caches also doesn't free up memory.
I would like to know that:
- Is this normal that mere mounting loop devices eats up memory ?
- Mounting 200 devices takes up almost 15 Sec. Is there any way to speed up this ? I am using the command: mount -o loop,nodev Sample.sq /mnt/loop1