3

We've got a company using a terminal server to do most of their work and when multiple people are using Chrome with a few tabs open the CPU gets maxed.

Is there an easy way to limit how much of the CPU Chrome can use up through group policies? We're using Server 2012 R2 & 2016.

  • Is it necessary to limit answers to only those that use Group Policy? Or are you more interested in how to throttle Chrome's CPU use? Consider editing your question if necessary. – I say Reinstate Monica Aug 23 '17 at 15:04

1 Answers1

3

There's no native way to throttle CPU usage, but you can set process affinity to only one core.

One way to do this via Group Policy is to deploy a scheduled task. If you only have one server, you can add this directly to its scheduled tasks. This example sets affinity of all Chrome processes to use only the 2nd core, i.e. CPU 1. Currently it runs every 5 minutes, but you can set other triggers.

schtasks /create /tn "Google Chrome affinity" \
 /tr "PowerShell 'ForEach($Process in Get-Process chrome) {$Process.ProcessorAffinity=2}'" \
 /sc minute /mo 5 /ru System

Every core has a bitmask (00000001, 00000010, 00000100 etc.). For multiple cores, simply sum them; e.g. CPU 2 and 3 results 00001100 (as 4+8=12), thus $Process.ProcessorAffinity=12.

While there might be some third party tools, I wouldn't recommend using any hacks on a server.

Esa Jokinen
  • 46,944
  • 3
  • 83
  • 129