I forced my browser to use maximum 20% CPU with cpulimit.

It makes my browser pretty slow tbh. It is crazy that browsers need so much CPU.

@RMW am about to restrict my browsers with cgroups to use less RAM. Last attempt, the OOMKiller ran with scissors! So, have to figure something with more elastic memory control in systemd-run. Icecat keeps using more than 1GB RAM once left open for days. Its task manager does not show the consumer. They are all below 50MB there.

@nergal RAM doesn't bother me that much, because I actually run my browser profile in RAM.

So CPU bothers me a wayyy more, especially when I am running a heavy KVM for college.

@nergal Anyway, I am definitely interested in decreasing the resources which browsers use.

@RMW systemd.resource-control(5) → CPUQuota

systemd-run --collect --scope --user --property=CPUQuota=30% <browser execution stanza>

systemd-run -G --scope --user -p CPUQuota=30% <browser exec stanza>

Adjust the percentage as you see fit. Once the browser hits the quota, it gets killed.

@nergal hmmm I am not sure of I want to kill it though. I just want to limit it.

@nergal HA, I forgot to enable profile-sync-daemon. That explains the CPU usage a little.

My browser profiles are in RAM now. This is better.

@RMW I've heard people saying w3m's not a realistic solution, but if you're reading a basic article then it's a genuinely comfortable browser. It has text, it downloads stuff, it can even sign into a few sites, and integrates perfectly with the newsboat RSS feed.

@malin I have used text-browsers before. They are ok for some things, but can't do everything.

@RMW It might actually be because cpulimit is not a good way to limit CPU usage. You want to use cgroups. An easy way to do this is using unified cgroups and systemd-run

@jookia I might try that someday, but honestly running my browser in RAM limits CPU usage a lot too.

Its usage is still high from time to time though.

@jookia It is just a more responsive experience in my opinion.

It feels a lot faster and it somehow seems to use less CPU.

@RMW Hmm. If it's faster then you might want to try a newer kernel or tweaking swappiness or your disk scheduler. The whole point of having virtual memory is to do this exact thing.

@jookia I am on the newest zen kernel. Having something completely in RAM still speeds things up, at least for me.

I never looked much into swappiness though.

@jookia I have not, but it is pretty noticeable, but hey my swappiness might just be configured wrong.

@jookia Uhm probably not then? I don't think that I configured that.

@RMW You probably want to do that just to check if that's your bottleneck

@jookia The SSD didn't use mq-deadline, HDD used bfq already.

Do these udev rules look ok?

@jookia btw sdb is just a weird disk which is very small, my SSD is weird. I don't actually use that small part.

@jookia Thanks for the help! I am sure that changing the SSD one will be better for my system.

@jookia Changing that helped a ton, although I think that I am gonna put the browser profile in RAM anyways.

CPU usage just seems lower when I do that.

Sign in to participate in the conversation

Linux Geeks doing what Linux Geeks do..