The issue is related to new cgroup v2.
To resolve this, revert cgroup to v1:
sudo sed -i '/^GRUB_CMDLINE_LINUX/ s/"$/ systemd.unified_cgroup_hierarchy=0"/' /etc/default/grub
and reboot.
After this /sys/fs/cgroup/memory/memory.limit_in_bytes will be present.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…