starwind workers to defined cpu

Software-based VM-centric and flash-friendly VM storage + free version

Moderators: anton (staff), art (staff), Max (staff), Anatoly (staff)

Post Reply
gklpnd
Posts: 14
Joined: Wed Mar 04, 2020 2:38 pm

Wed Jan 26, 2022 9:20 am

Hello,

I'm trying to bind some amount of starwind workers to defined cpu.
I'm testing on server with 1 physical cpu that has 4 cores with HT (8 logical processors), starwind version v8 build 14398.

I found in starwind.cfg next vars that can be usefull:

Code: Select all

ServerIoWorkersConcurency
ServerIoWorkersCount
ServerUseIdealProcForThreads
ServerUseOnlyOddCoresForThreads
With count of workers no problems, i.e. i want two workers then i must change next vars:

Code: Select all

ServerIoWorkersConcurency = 2
ServerIoWorkersCount = 2
But with cpu binding i have trouble. I tried several combination (i.e. i want to bind to first and third logical processors):

Code: Select all

ServerUseIdealProcForThreads = 1,3 
ServerUseOnlyOddCoresForThreads = 1,3

ServerUseIdealProcForThreads = 10100000 
ServerUseOnlyOddCoresForThreads = 10100000

ServerUseIdealProcForThreads = 0xA0 
ServerUseOnlyOddCoresForThreads = 0xA0
In starwind logs i have next:

Code: Select all

1/25 17:46:42.964751 101c Srv: Processor packages/cores/logical: 1/4/8
[...]
1/25 17:46:43.066955 101c Srv: iScsiServer::startWorkers: ServerNodesPerNumaNode = 1
1/25 17:46:43.066970 101c Srv: iScsiServer::startWorkers: Worker threads per server node: total 2, active 2
1/25 17:46:43.066990 101c Srv: SwServerNode::SwServerNode: Node 0: NUMA node 0 (8 cores)
1/25 17:46:43.067004 101c Srv: iScsiServer::startWorkers: ServerDefaultNode = 0
1/25 17:46:43.067037 101c Srv: SwThreadPool::start: TP[0]: preparing 2 worker threads (2 active)...
1/25 17:46:43.067316 1bbc Srv: SwThreadPool::workerThread: TP[0]: worker started at cpu 3+ (numa 0, mask 0xaa), maxEntries 1, priority: 0.
1/25 17:46:43.067361 10b0 Srv: SwThreadPool::workerThread: TP[0]: worker started at cpu 7+ (numa 0, mask 0xaa), maxEntries 1, priority: 0.
What is mean cpu N+ ?

And i have out of topic question.
I found that u have changed powershell script sync devices (SyncHaDeviceAdvanced.ps1) from:

Code: Select all

$params = new-object -ComObject StarWindX.Parameters        
$params.AppendParam("deviceID",$dev.DeviceId)
$params.AppendParam("partnetTargetName", $partnerTargetName)
                  
$server.ExecuteCommand( 0, "restoreHAPartnerNode", $params)
to:

Code: Select all

$syncType = 1;
$dev.Synchronize($syncType, $partnerTargetName);
But the new construction is not working in case when all starwind nodes was stopped and then started (in situation when HAdevice on both nodes has status "not synchronized").
And How long will the old construction work?

Thanks!
yaroslav (staff)
Staff
Posts: 2361
Joined: Mon Nov 18, 2019 11:11 am

Fri Jan 28, 2022 3:22 pm

Greetings,

Thank you for your question. We are analyzing your questions on CPU allocation.
By default, the SyncHADeviceAdvanced script can mark the node as synchronized. Be careful with that one, always stick with this article to restore the devices from the "not synchronized" state https://knowledgebase.starwindsoftware. ... -blackout/.
Sync type = 1 represents the synchronized device. I am just wondering about the script. The original one does not have the lines you shared here.
yaroslav (staff)
Staff
Posts: 2361
Joined: Mon Nov 18, 2019 11:11 am

Mon Jan 31, 2022 11:25 am

Greetings,

Thank you for your patience. There is no opportunity to allocate the CPU cores to the service.
ServerUseIdealProcForThreads and ServerUseOnlyOddCoresForThreads can only be set to 0 or 1.
gklpnd
Posts: 14
Joined: Wed Mar 04, 2020 2:38 pm

Fri Feb 04, 2022 9:15 am

Thanks for reply.

Sadly about cpu.
About powershell code it was in previous releases (from which u have changed it - i don't know).
In forum several topics with this construction of sync. (https://forums.starwindsoftware.com/vie ... a8f#p28607)
yaroslav (staff)
Staff
Posts: 2361
Joined: Mon Nov 18, 2019 11:11 am

Fri Feb 04, 2022 9:31 am

Hi,

That could be a custom script or an old one. Thanks for linking that thread here.
The new script kicks off synchronization for the devices so be really careful when remediating mutual not synchronized states for HA devices.
Post Reply