Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nocache works, systemd-run doesn't #52

Open
alkisg opened this issue Nov 8, 2022 · 0 comments
Open

nocache works, systemd-run doesn't #52

alkisg opened this issue Nov 8, 2022 · 0 comments

Comments

@alkisg
Copy link

alkisg commented Nov 8, 2022

This is the first issue I have ever opened to say that "your program works better than the alternative that you suggest"!

Test case, first without any optimizations:

  • backup-process takes 7 minutes (a mksquashfs chroot chroot.squashfs command)
  • While it's running, user-process takes 2.5 minutes (an ls -lR /home/username command)

Then I try with nocache:

  • nocache backup-process takes 9 minutes
  • While it's running, user-process takes 1.5 minutes

==> this is the correct optimization I'm looking for, to favor the user process.

Then I try the same thing with the systemd-run command that you mention in https://github.com/Feh/nocache#if-you-use-systemd.
I get the same results as "without any optimizations", 7 minutes and 2.5 minutes.

I do NOT notice this thing you mention:

During (notice how buff/cache only goes up by ~300MiB):

I was NOT able to make systemd-run limit the pagecache. buff/cache for me was using all the RAM, and my "free" column went down to almost zero.

The systemd.resource-control manpage mentions that:

Options for controlling the Legacy Control Group Hierarchy (Control Groups version 1 are now fully deprecated: CPUShares=weight, StartupCPUShares=weight, MemoryLimit=bytes, ...

So I tested with the recommended MemoryHigh instead, and I even tried MemoryMax, to no avail.
I was unable to make systemd-run NOT fill up the RAM with the pagecache, and as a result, the user-process couldn't keep its own pages in RAM and needed 2.5 minutes instead of 1.5 minute.

==> So I guess the actual issue is, "could you please update README.md with a working example for the newer cgroups v2?"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant