Score:2

how to set memory limit by percent in cgroups

cn flag

In my Ubuntu 20.04.2 LTS I need to set memory usage limit to 50%, but inside /sys/fs/cgroup/memory I see only "*limit_in_bytes" files.

Is it possible to limit memory usage by percent in cgroups?

heynnema avatar
ru flag
Just curious, why do you want to do this?
ru flag
@heynnema I assume in order to limit the total amount of memory apache can eat. Sometimes apache runs PHP code via `libapache2-mod-php` so if there is a lot of traffic then apache can eat tons of memory.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.