<elderK>
Hey guys, what do you think about hyperthreading? Have you any experience on turning off specific cores? The hope is that I can dedicate a given core to a process. In my case, a game which is CPU bound, to see if it reduces stuttering.
<elderK>
I've read about isolating CPU cores. I was thinking of isolating the cores, then disabling hyperthreading on the siblings. But, I have no experience with this and am unsure on whether it would help things any.
<braewoods>
elderK: hyperthreading is not a replacement for more physical cores
<braewoods>
generally it's up to the kernel to decide how to distribute process loads
<elderK>
There is the isolcpus parameter which force Linux never to schedule on that CPU, unless you do it yourself.
<elderK>
That probably doesn't apply to any hyperthreads, though.
<braewoods>
there's ways to influence it but i don't generally count on it
<braewoods>
no, i mean just changing what process a core is using
<braewoods>
err
<braewoods>
what core a process is using
<braewoods>
elderK: why are you looking at this? what else have you tried?
<elderK>
I'm looking into this because a game I play has been stuttering. I'm unsure of why. Looking at the game's forums, people mention it is very CPU bound and on Windows, they often solve the issue by dedicating it to a specific core.
<elderK>
I doubt these people are all that technically inclined but I figure it might be worth a try.
<elderK>
The game has a native Linux port which I use. I'm unsure how to determine why the game is stuttering at certain points other than look at htop when it is stuttering.
<braewoods>
is this happening even when there's nothing else demanding running?
<elderK>
Maybe I'll try GALLIUM_HUD too, to see the CPU vs GPU load.
<braewoods>
browsers and some other software are notorious for high cpu loads
<elderK>
Yes, it does. Just i3, the usual daemons and the game.
<elderK>
I suspect the game is loading assets.
DaViruz has joined #crux
<braewoods>
well if your CPU is struggling even when doing very little
<elderK>
Apparently the game is "single threaded." I imagine the forum people just mean the game wasn't designed to make use of multiple threads.
<braewoods>
your hardware may be the limiter
<elderK>
I don't know for sure if it is the CPU. That's the thing.
<braewoods>
what are you using
<elderK>
For all I know, it could be thermal throttling as it is a laptop.
<elderK>
The stuttering seems worse when using prime-run but that's purely subjective.
<elderK>
Unfortunately, Gallium HUD doesn't work when using prime-run. I'd set up MangoHUD but it requires more effort than I feel is worthwhile.
<stenur>
you could try a cgroup with dedicated processors, and start the game in that cgroup
<braewoods>
you could try adjusting the nice value as well
<braewoods>
nice value impacts prioritization of cpu resources
<elderK>
Any tips on how to isolate what is the cause? If it is the CPU or it is the GPU?
<stenur>
that could also be done via cgroups
<elderK>
Other than htop, or say, gallium HUD?
<stenur>
gpu not.
<elderK>
?
<stenur>
cgroups. not gpu
<braewoods>
it could also be a driver issue.
<stenur>
and taskset(1) exists
<elderK>
I'm using modesetting and the official NVIDIA drivers. Unfortunately, I find it hard to get a feel for how well the GPU is doing because I cannot use Gallium HUD with it. Graphically, the game never seems to frame except at certain points in the game. Say, jumping into a new system or going to a part of the system I haven't been in. There's stuttering for about ten seconds, then everything is smooth again until I jump to a new
<elderK>
system.
<elderK>
That's why I figure it is asset loading of some kind.
<elderK>
stenur: taskset doesn't ensure that nothing else runs on the CPU you assign the process to.
<stenur>
cgroups. never used taskset myself
<elderK>
I've never used cgroups. How hard is it to get started?
<stenur>
super easy.
<elderK>
Any chance you could point me to a few links to learn more?
<elderK>
One thing I've noticed, is that the CPU frequencies jump wildly, even when I set everything to performance.
<elderK>
The top frequency is 4.2G but I hardly ever hit that. No matter what I do, the CPUs always seem to jump frequencies and tend to favor lower ones. Sometimes this is due to thermal throttling - I infer this because raising the laptop and uncovering more fans, seems to help.
<stenur>
you want a different "weight" etc for sure (man cpuset)
<elderK>
Where can I learn about all this cgroup stuff, how to set it up, how to use it.
<stenur>
that is basically it.
<stenur>
you then have to create the program in that cgroup aka do "PROGRAM & echo $! > /sys/fs/cgroup/_box_web/cgroup.procs"
<braewoods>
elderK: that's the turbo speed. it can't sustain that for long.
<stenur>
ie move the PID of the program to cgroup.procs
<elderK>
That's what I figured. Unfortunately, the "turbo_pct" seems to be quite high.
<elderK>
If I understand turbo_pct correctly, a value of say, 60% means that 60% of the frequencies are in the turbo state.
<elderK>
This might be why this new CPU seems slower than older one: The older one had a tiny turbo_pct, the new one has a high turbo_pct.
<elderK>
braewoods:
<elderK>
is supported by hardware that is in the turbo range. This number
<elderK>
is independent of whether turbo has been disabled or not.
<elderK>
turbo_pct: Displays the percentage of the total performance that
<braewoods>
i usually disable turbo for thermal reasons.
<elderK>
Is my interpretation of turbo_pct correct?
<braewoods>
no idea. never used it.
Moth has quit [Remote host closed the connection]
Moth has joined #crux
<elderK>
I guess I could just disable turbo boost and figure out the highest frequency.
<elderK>
I'm pretty sure it winds up being something really low like 1.3GHz.
<pedja>
is there a way to make the jump to and from turbo states smoother? or is that controlled by firmware/cooling/whatever?
<stenur>
i use the cpupower tool from the linux source tree
<stenur>
for kernel building i do cpupower frequency-set -u $hi where $hi is box specific; one can use "cpupower frequency-info" to see what is going on
<stenur>
didn't make a port because it needs the linux source tree, and i hate requiring that for glibc so why for that super small program
<SiFuh>
elderK: how do you find Dell? I remember when they wer crap. I am wondering if they are much better these days or still awful
<SiFuh>
I haven't touched one since before the took over Alienware and I haven't touched an Alienware since then either
<SiFuh>
I was looking at a few today but haven't decided but I didn't mind the interior, I just didn't like the exterior. Also seems customer support is still pretty good
<braewoods>
elderK: what's your BIOS revision?
<braewoods>
updating it could help
<braewoods>
you'd probably need to be in windows for that though
<braewoods>
well power settings can also influence performance
<elderK>
I've got them all set to performance as a rule.
<elderK>
I was wondering what you guys use for benchmarking.
<elderK>
I'm currently using s-tui and stress.
<elderK>
Using pstate-frequency and tlp. pstate-frequency to make changes to the pstate stuff.
<elderK>
Trying to determine which turbo frequency is the most stable, and the best long term frequency for "stable" performance.
<elderK>
Running at 1.4G, thermal is never a problem and the frequency doesn't jump about.
<elderK>
Higher frequencies jump around to differing levels: Highest with turbo, jumps around a lot and overheats fast.
<elderK>
2.4GHz is pretty stable for a time then drops to 2.1GHz and lingers there. That seems to be a decent frequency to hit.
<elderK>
I would like to know though like, if I run at those frequencies with some long running test, how is the relative peformance? Is it better to run in turbo even though it jumps around? Or is it better to have a more conservative frequency that is stable?