CPU Affinity Not Parsing After Many Days of Uptime

Having problems with the panel? Have questions? Post here!
Post Reply
spykethefox
Posts: 13
Joined: Fri Aug 30, 2019 2:45 pm

CPU Affinity Not Parsing After Many Days of Uptime

Post by spykethefox »

Hi,
I have noticed after a couple of months with the latest patches that some of my servers will lose their affinity after the panel has been live for over 10 days. This was not an issue in the past. I first seen this issue starting not in the latest patch but the one just before the most recent.

More clarification, the culprits seem to be servers that run two applications for the server client. I.e. Squad, it is setting the affinity correctly on the first iteration of the server client but not the second that spins up when launching a single server. So I run 3 to 4 squad servers on the panel and each time currently that I launch a new instance the first controller gets the correct 2 cores of affinity and the second part of the client gets 8 cores of affinity instead of the assigned two. This is causing issues with the other squad servers on the box as they are now sharing precious resource that they simply dont have to spare. Thanks for any feedback you are able to provide.

One note is that this is completely resolved with a full box reboot.

OS: Windows Server 2016
Install: EZUGCC
Version: Latest Public Release
Masher
Site Admin
Posts: 3612
Joined: Thu Apr 20, 2006 2:54 pm
Location: America's Heartland
Contact:

Re: CPU Affinity Not Parsing After Many Days of Uptime

Post by Masher »

The panel would log an error if it's not able to set the affinity. Any messages in the logs?

If the server the panel launches then launches another executable, the second executable would inherit the parent's affinity. So what's likely happening is the second process is being launched quicker than the panel is able to set the affinity. Makes sense if it works after a reboot (the cache is cleared). Can you launch squad without the first executable? Only way to get around it currently.

Some other games do this, and the executable that launches the second executable ins't necessary. You can look in task manager and get the commandline used on the second process and try starting it directly in the panel. I don't recall if that is the way squad does it not.
Masher
-----------
Please do not PM me unless asked to! We are a small company. If you have an issue or question it would be best to post it in the forums where it can help others in the future.

NEW Join our Discord!
spykethefox
Posts: 13
Joined: Fri Aug 30, 2019 2:45 pm

Re: CPU Affinity Not Parsing After Many Days of Uptime

Post by spykethefox »

I have checked the logs and I do not see anything regarding this in the logs. The server will not run without both exe active. I can verify with the devs the reason behind this if needed, but I believe it is either the sound handler or the EAC for the server. I tried this back a couple of years ago and was never able to keep the server running with just one exe.

Is there a possibility to manually clear the cache without a reboot? I have customers that a reboot would effect, though if not its just a scheduling thing for me to get a box boot.
Masher
Site Admin
Posts: 3612
Joined: Thu Apr 20, 2006 2:54 pm
Location: America's Heartland
Contact:

Re: CPU Affinity Not Parsing After Many Days of Uptime

Post by Masher »

Don't know about the cache, that's something that's managed by the operating system.

Can you not change the affinity in task manager?
Masher
-----------
Please do not PM me unless asked to! We are a small company. If you have an issue or question it would be best to post it in the forums where it can help others in the future.

NEW Join our Discord!
spykethefox
Posts: 13
Joined: Fri Aug 30, 2019 2:45 pm

Re: CPU Affinity Not Parsing After Many Days of Uptime

Post by spykethefox »

I can change in task manager. Thats no issue at all. Just I am not sure what servers are restarted and when, and in order to prevent poor performance for the servers, I am having to grant a 3rd core to ensure that when one is spun up the servers wont tank out until we are able to get the affinity set.
spykethefox
Posts: 13
Joined: Fri Aug 30, 2019 2:45 pm

Re: CPU Affinity Not Parsing After Many Days of Uptime

Post by spykethefox »

If you need some access or anything to see if there is something that I am missing, I am more than willing to oblige. Just send me over a DM if you need this.
spykethefox
Posts: 13
Joined: Fri Aug 30, 2019 2:45 pm

Re: CPU Affinity Not Parsing After Many Days of Uptime

Post by spykethefox »

I just checked with a customer, they rebooted their server and it seems to keep the affinity correct on it, but the other squad servers are not keeping their affinity when booted, they have always been the ones to cause the issue in the past as far as I have ever noticed since this all began. It may be something I am missing or changed that I am just not seeing at this point.
Masher
Site Admin
Posts: 3612
Joined: Thu Apr 20, 2006 2:54 pm
Location: America's Heartland
Contact:

Re: CPU Affinity Not Parsing After Many Days of Uptime

Post by Masher »

Can you send me the logs for one of the servers that doesn't have an affinity assigned? You can PM me the logs if there's anything private.

I'm curious to see if the panel or monitor started it.
Masher
-----------
Please do not PM me unless asked to! We are a small company. If you have an issue or question it would be best to post it in the forums where it can help others in the future.

NEW Join our Discord!
spykethefox
Posts: 13
Joined: Fri Aug 30, 2019 2:45 pm

Re: CPU Affinity Not Parsing After Many Days of Uptime

Post by spykethefox »

6/30/2020 1:38:12 AM Squad (1) This Host (1) ignis (5) www 0 Server id: 1 started by user id ignis
6/30/2020 1:38:12 AM Squad (1) This Host (1) ignis (5) www 0 Pid for server 1 is 1580
6/30/2020 1:38:11 AM Squad (1) This Host (1) ignis (5) www 0 Server ID: 1 stopped by user: ignis
6/30/2020 1:38:11 AM Squad (1) This Host (1) ignis (5) www 0 Killing child processes of process 4092 with taskkill
6/30/2020 1:26:34 AM Squad (1) This Host (1) ignis (5) www 0 Server id: 1 started by user id ignis
6/30/2020 1:26:34 AM Squad (1) This Host (1) ignis (5) www 0 Pid for server 1 is 4092
6/30/2020 1:26:33 AM Squad (1) This Host (1) ignis (5) www 0 Server ID: 1 stopped by user: ignis
6/30/2020 1:26:33 AM Squad (1) This Host (1) ignis (5) www 0 Killing child processes of process 4532 with taskkill
6/30/2020 1:22:01 AM Squad (1) This Host (1) ignis (5) www 0 Server id: 1 started by user id ignis
6/30/2020 1:22:01 AM Squad (1) This Host (1) ignis (5) www 0 Pid for server 1 is 4532
6/30/2020 1:22:00 AM Squad (1) This Host (1) ignis (5) www 0 Server ID: 1 stopped by user: ignis
6/30/2020 1:21:59 AM Squad (1) This Host (1) ignis (5) www 0 Killing child processes of process 7728 with taskkill
6/30/2020 1:04:25 AM Squad (1) This Host (1) ignis (5) www 0 Server id: 1 started by user id ignis
6/30/2020 1:04:25 AM Squad (1) This Host (1) ignis (5) www 0 Pid for server 1 is 7728
6/30/2020 1:04:24 AM Squad (1) This Host (1) ignis (5) www 0 Server ID: 1 stopped by user: ignis
6/30/2020 1:04:24 AM Squad (1) This Host (1) ignis (5) www 0 Killing child processes of process 3780 with taskkill
6/29/2020 10:37:32 PM Squad (1) This Host (1) ignis (5) www 0 Server id: 1 started by user id ignis
6/29/2020 10:37:32 PM Squad (1) This Host (1) ignis (5) www 0 Pid for server 1 is 3780
6/29/2020 10:37:31 PM Squad (1) This Host (1) ignis (5) www 0 Server ID: 1 stopped by user: ignis
6/29/2020 10:37:31 PM Squad (1) This Host (1) ignis (5) www 0 Killing child processes of process 4756 with taskkill
6/29/2020 4:35:05 PM Squad (1) This Host (1) Beeker (2) www 0 Server id: 1 started by user id Beeker
6/29/2020 4:35:05 PM Squad (1) This Host (1) Beeker (2) www 0 Pid for server 1 is 4756
6/29/2020 4:31:21 PM Squad (1) This Host (1) Beeker (2) www 0 Server ID: 1 stopped by user: Beeker
6/29/2020 4:31:20 PM Squad (1) This Host (1) Beeker (2) www 0 Killing child processes of process 5432 with taskkill
6/29/2020 4:30:10 PM Squad (1) This Host (1) Beeker (2) www 0 Server id 1 restarted after update.
6/29/2020 4:30:10 PM Squad (1) This Host (1) Beeker (2) www 0 Server id: 1 started by user id admin
6/29/2020 4:30:10 PM Squad (1) This Host (1) Beeker (2) www 0 Pid for server 1 is 5432
6/29/2020 4:30:10 PM Squad (1) This Host (1) Beeker (2) www 0 Update completed for server id: 1
6/29/2020 4:30:10 PM Squad (1) This Host (1) Beeker (2) www 0 Update process was killed for server id: 1
6/29/2020 4:27:58 PM Squad (1) This Host (1) Beeker (2) www 0 Starting update of server id 1
6/29/2020 4:27:33 PM Squad (1) This Host (1) Beeker (2) www 0 Server ID: 1 stopped by user: Beeker
6/29/2020 4:27:33 PM Squad (1) This Host (1) Beeker (2) www 0 Killing child processes of process 2172 with taskkill
spykethefox
Posts: 13
Joined: Fri Aug 30, 2019 2:45 pm

Re: CPU Affinity Not Parsing After Many Days of Uptime

Post by spykethefox »

Its really just the same thing over and over again, nothing of any difference.
spykethefox
Posts: 13
Joined: Fri Aug 30, 2019 2:45 pm

Re: CPU Affinity Not Parsing After Many Days of Uptime

Post by spykethefox »

I just restarted both of the servers having the issue, now it is setting the affinity correctly. So this seems hit or miss now.
spykethefox
Posts: 13
Joined: Fri Aug 30, 2019 2:45 pm

Re: CPU Affinity Not Parsing After Many Days of Uptime

Post by spykethefox »

Also, I would like to take the time to say thank you for the support and time :) We have enjoyed the Panel for the year we have had it and never plan to swap to anything else, our customers love the panel as well. Really great product you have here!
Masher
Site Admin
Posts: 3612
Joined: Thu Apr 20, 2006 2:54 pm
Location: America's Heartland
Contact:

Re: CPU Affinity Not Parsing After Many Days of Uptime

Post by Masher »

I did some testing, thinking maybe I forgot to set the affinity in some part of the code, but I don't believe that to be the case.

I think what needs to be done is parse through the process tree and check for children and set their affinity as well. I'll try to get a beta update for you this weekend.

And thanks for the kind words, we truly appreciate your business.
Masher
-----------
Please do not PM me unless asked to! We are a small company. If you have an issue or question it would be best to post it in the forums where it can help others in the future.

NEW Join our Discord!
Masher
Site Admin
Posts: 3612
Joined: Thu Apr 20, 2006 2:54 pm
Location: America's Heartland
Contact:

Re: CPU Affinity Not Parsing After Many Days of Uptime

Post by Masher »

http://redirect.brainless.us/UGCC/2.34

If a server have kill child processes enabled, this update will check for children and apply affinity and priority settings to children. I believe this will fix your issue you are seeing.

However, this is a part of the 2.30 code base and had some pretty significant backend changes, so please make sure you backup all the panel/monitor files and database before upgrading incase something goes horribly wrong. :)
Masher
-----------
Please do not PM me unless asked to! We are a small company. If you have an issue or question it would be best to post it in the forums where it can help others in the future.

NEW Join our Discord!
spykethefox
Posts: 13
Joined: Fri Aug 30, 2019 2:45 pm

Re: CPU Affinity Not Parsing After Many Days of Uptime

Post by spykethefox »

My apologies, I havent checked back in a bit. I will certainly give this a try! Thank you again for everything!!!
Post Reply