FreeBSD Scheduling on Hybrid CPUs
21–30 of 35 posts
Re: FreeBSD Scheduling on Hybrid CPUs
#22The high-level pitch of P cores and E cores seems so elegant, but when it actually comes to scheduling, it gets messy fast. Even in a laptop running off a battery, you can't simply switch to E cores because some short-lived work might be latency-sensitive. You also can't assume long-running work should be on an E core because maybe you're anxious to get that video encoded. Even for lots of small work, different core…
Funny enough, Unix already has user-settable priorities, aka "nice level". ACPI gives us an idea how plentiful the power is. So, when powered by AC power, schedule everything on P cores when possible, schedule processes that eat a lot of CPU on P cores, same for any process with a negative nice value. When powered by a battery, schedule anything with non-negative nice value on E cores, keep one P core up for real-tim…
Re: FreeBSD Scheduling on Hybrid CPUs
#23The high-level pitch of P cores and E cores seems so elegant, but when it actually comes to scheduling, it gets messy fast. Even in a laptop running off a battery, you can't simply switch to E cores because some short-lived work might be latency-sensitive. You also can't assume long-running work should be on an E core because maybe you're anxious to get that video encoded. Even for lots of small work, different core…
Funny enough, Unix already has user-settable priorities, aka "nice level". ACPI gives us an idea how plentiful the power is. So, when powered by AC power, schedule everything on P cores when possible, schedule processes that eat a lot of CPU on P cores, same for any process with a negative nice value. When powered by a battery, schedule anything with non-negative nice value on E cores, keep one P core up for real-tim…
Re: FreeBSD Scheduling on Hybrid CPUs
#24Earlier quoted context omitted.
> So, when powered by AC power, schedule everything on P cores when possible, schedule processes that eat a lot of CPU on P cores, same for any process with a negative nice value. Even when plugged in, you may have thermal limitations. P cores will chew through your power budget more aggressively than E cores. For latency-sensitive workloads you do want to emphasize the P cores, but when throughput is the goal you'll…
Always personally disable turbo boost. Especially on laptops
Only way to stop laptop getting crazy hot and fans meaningfully reducing pressure on desk of laptop...
Re: FreeBSD Scheduling on Hybrid CPUs
#25Re: FreeBSD Scheduling on Hybrid CPUs
#26The high-level pitch of P cores and E cores seems so elegant, but when it actually comes to scheduling, it gets messy fast. Even in a laptop running off a battery, you can't simply switch to E cores because some short-lived work might be latency-sensitive. You also can't assume long-running work should be on an E core because maybe you're anxious to get that video encoded. Even for lots of small work, different core…
As a user with a laptop, the last thing I want is the OS to decide for me. I want to tell it myself "this is sensitive, put all your energy into it because I'm five minutes away from pushing that important work and I have seven minutes of battery left" or "this won't work at all if run at less than 2 GHz" vs "I must drag what I'm doing along for as long as I can, save every bit of battery possible. The computer can't…
If when the battery is full you make the right decisions your battery can last longer. However this isn't something you can do. You don't want a pop-up when your email program spawns a thread to check for new email - programs do this all the time and the system doesn't know if the thread itself will run for a few ms or for hours. In most cases the battery consumed by the popup will be more than the thread itself uses. You want the system to make the right decisions - but the right decision depends on your system and someone else with a difference CPU may need different decisions.
Re: FreeBSD Scheduling on Hybrid CPUs
#27Earlier quoted context omitted.
> So, when powered by AC power, schedule everything on P cores when possible, schedule processes that eat a lot of CPU on P cores, same for any process with a negative nice value. Even when plugged in, you may have thermal limitations. P cores will chew through your power budget more aggressively than E cores. For latency-sensitive workloads you do want to emphasize the P cores, but when throughput is the goal you'll…
Always personally disable turbo boost. Especially on laptops
Re: FreeBSD Scheduling on Hybrid CPUs
#28Re: FreeBSD Scheduling on Hybrid CPUs
#29Intel is quietly having their bulldozer moment
The AMD Bulldozers put a lot of new, untested ideas in to practice. Some of them paid off, while many did not, at least not in the short term. There were, however, many good ideas, and many of those lived on and helped make Ryzen what it is.
Over time, Bulldozer performance has matched and exceeded contemporary Intel performance, both because compiler optimizations have made better use of the CPU and because of the slowdowns from Spectre / Meltdown affecting Intel much more than AMD. I still run an FX-8150 server and have compared it with an Intel 2600K system in many tasks.
Do we think that Intel is going to use their current shitshow to make a golden age of Intel CPUs, like how Bulldozer led to Ryzen? I personally don't think so. They've put all their cheap tricks in to their CPUs, tricks which require huge slowdowns when flaws are found, and unless / until they start caring about actually doing things correctly rather than playing fast and loose with hundreds of watts, they'll keep trying to game the benchmarks, will keep having flaws and problems, and will keep losing market share.
Re: FreeBSD Scheduling on Hybrid CPUs
#30Earlier quoted context omitted.
Funny enough, Unix already has user-settable priorities, aka "nice level". ACPI gives us an idea how plentiful the power is. So, when powered by AC power, schedule everything on P cores when possible, schedule processes that eat a lot of CPU on P cores, same for any process with a negative nice value. When powered by a battery, schedule anything with non-negative nice value on E cores, keep one P core up for real-tim…
I may be completely wrong, but I read that E cores are not power efficient, rather they are die space efficient.
For CPU's, those two types of efficiency are closely related. Omitted transistors (in an E core design) neither take up die space, nor consume power. And CPU cooling systems are ultimately measured by how many watts of heat they can remove from each unit of die area - so fewer watts from a smaller core. (That's at a given temperature difference, etc. But your die will die if any part of it gets too hot. And revving up the CPU cooling fan is generally not preferred.)