echo 4G > memory.max: memory.max always 0tc don't see marked with -j MARK packetsTouchpad not recognized...
When you're given a degree sequence, what is the method to draw a graph which has that degree sequence?
Should I cheat if the majority does it?
Performance of loop vs expansion
Which are more efficient in putting out wildfires: planes or helicopters?
What do you call the angle of the direction of an airplane?
Are the plates of a battery really charged?
Why are symbols not written in words?
Fine-tuning parameters for existing methods
How can I get a file's size with C++17?
Blood-based alcohol for vampires?
Was Wolfgang Unzicker the last Amateur GM?
Misaligned Columns
What does "another" mean in this case?
How come having a Deathly Hallow is not a big deal?
Phrase origin: "You ain't got to go home but you got to get out of here."
Is it possible to obtain the address of the 'this' pointer?
Magento 2: I am not aware about magneto optimization. Can you please share the steps for this?
Old story where computer expert digitally animates The Lord of the Rings
Turing Machines: What is the difference between recognizing, deciding, total, accepting, rejecting?
Should I cross-validate metrics that were not optimised?
Why would a propellor have blades of different lengths?
Bootstrap paradox with a time machine in iron
SQL Server error 242 with ANSI datetime
Who pays for increased security measures on flights to the US?
echo 4G > memory.max: memory.max always 0
tc don't see marked with -j MARK packetsTouchpad not recognized on linux (ASUS R751LB)Warnings/Errors when running clamav/clamscan, scanning 3TB hard-driveLinux Cgroup writing to control files, working for CPU but not Device subsystem?“cannot allocate memory” error when trying to create folder in cgroup hierarchycgroups memory limit - write error: Device or resource busycURL requests in bashLimit total memory usage for multiple instances of systemd serviceEcho Permission Denied (Trying to use echo instead of ls command in shell script)Setting a timeout and limiting memory of a process
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}
I'm trying to set a memory limit with cgroup2 with this command:
echo 4G > memory.max
This works fine on my laptop, but on my server cat memory.max always returns 0. No matter what I write to it (even writing max doesn't work), it is always 0
What is happening here and how can I fix it?
linux cgroups
New contributor
Demindiro is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
add a comment |
I'm trying to set a memory limit with cgroup2 with this command:
echo 4G > memory.max
This works fine on my laptop, but on my server cat memory.max always returns 0. No matter what I write to it (even writing max doesn't work), it is always 0
What is happening here and how can I fix it?
linux cgroups
New contributor
Demindiro is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
add a comment |
I'm trying to set a memory limit with cgroup2 with this command:
echo 4G > memory.max
This works fine on my laptop, but on my server cat memory.max always returns 0. No matter what I write to it (even writing max doesn't work), it is always 0
What is happening here and how can I fix it?
linux cgroups
New contributor
Demindiro is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
I'm trying to set a memory limit with cgroup2 with this command:
echo 4G > memory.max
This works fine on my laptop, but on my server cat memory.max always returns 0. No matter what I write to it (even writing max doesn't work), it is always 0
What is happening here and how can I fix it?
linux cgroups
linux cgroups
New contributor
Demindiro is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
Demindiro is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
Demindiro is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
asked 50 mins ago
DemindiroDemindiro
11 bronze badge
11 bronze badge
New contributor
Demindiro is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
Demindiro is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
The problem is caused by the trailing newline when using echo, which is interpreted as a 0.
e.g.:
$ cat memory.max
max
$ echo 4G > memory.max
$ cat memory.max
0
$ echo -n 4G > memory.max
$ cat memory.max
4294967296
$ echo max > memory.max
$ cat memory.max
0
$ echo -n max > memory.max
$ cat memory.max
max
Normally it should work with a newline, but it depends on which libc version you are using.
e.g. On a system with glibc strace echo 4G returns this:
...
write(1, "4Gn", 34G
) = 3
...
However, if you use musl-libc you get this instead:
...
writev(1, [{iov_base="4G", iov_len=2}, {iov_base="n", iov_len=1}], 24G
) = 3
...
New contributor
Demindiro is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "106"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Demindiro is a new contributor. Be nice, and check out our Code of Conduct.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f527951%2fecho-4g-memory-max-memory-max-always-0%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
The problem is caused by the trailing newline when using echo, which is interpreted as a 0.
e.g.:
$ cat memory.max
max
$ echo 4G > memory.max
$ cat memory.max
0
$ echo -n 4G > memory.max
$ cat memory.max
4294967296
$ echo max > memory.max
$ cat memory.max
0
$ echo -n max > memory.max
$ cat memory.max
max
Normally it should work with a newline, but it depends on which libc version you are using.
e.g. On a system with glibc strace echo 4G returns this:
...
write(1, "4Gn", 34G
) = 3
...
However, if you use musl-libc you get this instead:
...
writev(1, [{iov_base="4G", iov_len=2}, {iov_base="n", iov_len=1}], 24G
) = 3
...
New contributor
Demindiro is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
add a comment |
The problem is caused by the trailing newline when using echo, which is interpreted as a 0.
e.g.:
$ cat memory.max
max
$ echo 4G > memory.max
$ cat memory.max
0
$ echo -n 4G > memory.max
$ cat memory.max
4294967296
$ echo max > memory.max
$ cat memory.max
0
$ echo -n max > memory.max
$ cat memory.max
max
Normally it should work with a newline, but it depends on which libc version you are using.
e.g. On a system with glibc strace echo 4G returns this:
...
write(1, "4Gn", 34G
) = 3
...
However, if you use musl-libc you get this instead:
...
writev(1, [{iov_base="4G", iov_len=2}, {iov_base="n", iov_len=1}], 24G
) = 3
...
New contributor
Demindiro is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
add a comment |
The problem is caused by the trailing newline when using echo, which is interpreted as a 0.
e.g.:
$ cat memory.max
max
$ echo 4G > memory.max
$ cat memory.max
0
$ echo -n 4G > memory.max
$ cat memory.max
4294967296
$ echo max > memory.max
$ cat memory.max
0
$ echo -n max > memory.max
$ cat memory.max
max
Normally it should work with a newline, but it depends on which libc version you are using.
e.g. On a system with glibc strace echo 4G returns this:
...
write(1, "4Gn", 34G
) = 3
...
However, if you use musl-libc you get this instead:
...
writev(1, [{iov_base="4G", iov_len=2}, {iov_base="n", iov_len=1}], 24G
) = 3
...
New contributor
Demindiro is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
The problem is caused by the trailing newline when using echo, which is interpreted as a 0.
e.g.:
$ cat memory.max
max
$ echo 4G > memory.max
$ cat memory.max
0
$ echo -n 4G > memory.max
$ cat memory.max
4294967296
$ echo max > memory.max
$ cat memory.max
0
$ echo -n max > memory.max
$ cat memory.max
max
Normally it should work with a newline, but it depends on which libc version you are using.
e.g. On a system with glibc strace echo 4G returns this:
...
write(1, "4Gn", 34G
) = 3
...
However, if you use musl-libc you get this instead:
...
writev(1, [{iov_base="4G", iov_len=2}, {iov_base="n", iov_len=1}], 24G
) = 3
...
New contributor
Demindiro is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
Demindiro is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
answered 48 mins ago
DemindiroDemindiro
11 bronze badge
11 bronze badge
New contributor
Demindiro is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
Demindiro is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
add a comment |
add a comment |
Demindiro is a new contributor. Be nice, and check out our Code of Conduct.
Demindiro is a new contributor. Be nice, and check out our Code of Conduct.
Demindiro is a new contributor. Be nice, and check out our Code of Conduct.
Demindiro is a new contributor. Be nice, and check out our Code of Conduct.
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f527951%2fecho-4g-memory-max-memory-max-always-0%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown