File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed
Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change 1212import tempfile
1313import traceback
1414
15+ from core .utils .cpu import get_cpus_from_affinity , get_p_core_affinity
16+
1517if sys .platform == 'win32' :
1618 import win32con
1719 import win32gui
@@ -458,6 +460,12 @@ def do_startup(self):
458460 self .set_priority (self .locals .get ('priority' ))
459461 if 'affinity' in self .locals :
460462 self .set_affinity (self .locals .get ('affinity' ))
463+ else :
464+ # make sure, we only use P-cores for DCS servers
465+ p_core_affinity = get_p_core_affinity ()
466+ if p_core_affinity :
467+ self .log .info (f" => P/E-Core CPU detected." )
468+ self .set_affinity (get_cpus_from_affinity (get_p_core_affinity ()))
461469 self .log .info (f" => DCS server starting up with PID { p .pid } " )
462470 except Exception :
463471 self .log .error (f" => Error while trying to launch DCS!" , exc_info = True )
You can’t perform that action at this time.
0 commit comments