Score:0

WSL2 Ubuntu 22.04.2 LTS Performance Mode

gl flag

Is there a way to set WSL2 Ubuntu 22 to performance mode? I know the original version of the OS you can just set it to performance mode but I'm not sure how to do it through WSL2.

When I run

grep "cpu MHz" /proc/cpuinfo

It shows

cpu MHz         : 3192.001

cpu MHz : 3192.001 cpu MHz : 3192.001 cpu MHz : 3192.001 cpu MHz : 3192.001 cpu MHz : 3192.001 cpu MHz : 3192.001 cpu MHz : 3192.001 cpu MHz : 3192.001 cpu MHz : 3192.001 cpu MHz : 3192.001 cpu MHz : 3192.001

But task manager on Windows shows about 4.2 GHz.

I'm wondering if WSL2 is able to take advantage of Intel turbo.

pl flag
Looks like it always just reports the base cpu speed, no matter what speed the cores are actually running.
Score:0
vn flag

Probably not. A.k.a. "No, but I could always be wrong."

Under WSL2, Ubuntu is running as a container/namespace inside a managed virtual machine. That "managed" part means that we, as end-users, don't have much control over it directly. Even if it was running in a virtual machine, I'm not sure there's any hypervisor that would allow you to control the CPU at that level. It's the host operating system that has to handle that.

While I haven't tried this, it might be possible to change the Windows process priority for WSL/Ubuntu. In Windows 11 22H2, in the Task Manager, you can choose the Details tab, right-click on wsl.exe, and use Set priority to select from:

  • Realtime
  • High
  • Above Normal
  • Normal (default)
  • Below Normal
  • Low

It would be interesting to hear what direct results you might see (or not) in Ubuntu performance after changing this.

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.