.:: Bots United ::.  
filebase forums discord server github wiki web
cubebot epodbot fritzbot gravebot grogbot hpbbot ivpbot jkbotti joebot
meanmod podbotmm racc rcbot realbot sandbot shrikebot soulfathermaps yapb

Go Back   .:: Bots United ::. > Enhancement Workshop > (mEAn) Bot.Admin Mod / ServerLoader > (mEAn) ServerLoader > General Forum - ServerLoader
General Forum - ServerLoader Post your questions, comments, solutions and suggestions for the ServerLoader in here

Reply
 
Thread Tools
Server loader and multiple CPUs
Old
  (#1)
Zydeco
Member
 
Status: Offline
Posts: 2
Join Date: Mar 2006
Default Server loader and multiple CPUs - 19-03-2006

Hi
Firstly, thanks for a lovely program, it rocks.
I have one request and one finding i'd like to share. Firstly i'm wondering if it's possible make the 'mean server loader' bind a specific process to start on a specific CPU. Right now it just leaves it default, which means the process spawns on what ever CPU it wants to afaik. A CPU binding thing like firedaemon has would be super.

Secondly i think i think the only thing you can do to not make HLDS quit after you log off is to enable 'fast user switch'. This works on my server which i admin with windows remote desktop. You cant get show window to work though, but that's something we'll have to live with.
  
Reply With Quote
Re: Server loader and multiple CPUs
Old
  (#2)
botmeister
Ex-Council Member
 
botmeister's Avatar
 
Status: Offline
Posts: 1,090
Join Date: Nov 2003
Location: Canada
Default Re: Server loader and multiple CPUs - 21-03-2006

Yes it looks like I can add binding to a specific cpu. If I find the time, I'll give it a try. In case you did not know, the source code is available for modifications if you have the skills (and time).

This system call should do the trick
SetProcessAffinityMask(ProcessInfo.hProcess, BitMask);

I knew about the "fast user switch". It just keeps the previous user logged in. Under windows 2000 there's no such thing however, so you need Windows XP or higher.

I tried a lot of different things, but I found nothing that kept the processes running after a log out.


Maker of the (mEAn) Bot.Admin Manager

"In theory, there is no difference between theory and practice. But, in practice, there is." - Jan L.A. van de Snepscheut
  
Reply With Quote
Re: Server loader and multiple CPUs
Old
  (#3)
botmeister
Ex-Council Member
 
botmeister's Avatar
 
Status: Offline
Posts: 1,090
Join Date: Nov 2003
Location: Canada
Default Re: Server loader and multiple CPUs - 23-03-2006

OK I got it working so that you can specify a CPU mask allowing you to specify exactly which CPU(s) to run processes on - it seems to work fine on my 2 processor system. I'll post a beta test download link right after I clean it up.

I have the loader doing various tasks all day, so for me the software is essential. What I want to do next is put in a process schedule so that you can better specify when processes execute and allow the loader to terminate tasks on a timed schedule.

Lots to do yet.


Maker of the (mEAn) Bot.Admin Manager

"In theory, there is no difference between theory and practice. But, in practice, there is." - Jan L.A. van de Snepscheut
  
Reply With Quote
Re: Server loader and multiple CPUs
Old
  (#4)
Zydeco
Member
 
Status: Offline
Posts: 2
Join Date: Mar 2006
Default Re: Server loader and multiple CPUs - 23-03-2006

Nice one! That's great, im gonna keep and eye here, if you have anything ready i can help test it.
  
Reply With Quote
Re: Server loader and multiple CPUs
Old
  (#5)
botmeister
Ex-Council Member
 
botmeister's Avatar
 
Status: Offline
Posts: 1,090
Join Date: Nov 2003
Location: Canada
Default Re: Server loader and multiple CPUs - 03-04-2006

meanloader12201beta.zip

Here's the rough beta. I'm very busy atm, so here it is without the cleanup I wanted to do. There's some debugging info placed into the log file so you can see if the CPU mask is being applied correctly. It will do a safety check to make sure that your affinity masks will always apply only to the available CPU's even if the mask is in error, so you don't have to worry about messing up when you experiment. For now there's no command to change the affinity mask on-the-fly as you can with the priority, but that'll come next.

In mEAnLoader.ini add the following to each process that you want to customize (default mask of "0" applies to all cpu's):

Example for process 0:

[Process_0]
AffinityMask = 1

; For now you have to put in a decimal number as the bit mask,
; not very nice but it works.
;
; AffinityMask Codes:
; 0 = all available CPU's
; 1 = 0001 = CPU 1
; 2 = 0010 = CPU 2
; 3 = 0011 = CPU's 1, 2
; 4 = 0100 = CPU 3
; 5 = 0101 = CPU's 3 + 1
; 6 = 0110 = CPU's 3 + 2
; 7 = 0111 = CPU's 3 + 2 + 1
; 8 = 1000 = CPU 4
; 9 = 1001 = CPU's 4 + 1
; etc

To install the new version, uninstall meanloader and overwrite the previous version with the new beta version, then reload the service and start it.


Maker of the (mEAn) Bot.Admin Manager

"In theory, there is no difference between theory and practice. But, in practice, there is." - Jan L.A. van de Snepscheut
  
Reply With Quote
Re: Server loader and multiple CPUs
Old
  (#6)
lextalionis
Member
 
Status: Offline
Posts: 16
Join Date: Feb 2005
Default Re: Server loader and multiple CPUs - 28-04-2006

Well,

I haven't been on the forum for over a year But there mucho credit I owe! We (www.hellsgamers.com) have come a long way from where I was last I posted about meanloader over a year ago. We are still using (mEAn) Server Loader version 1.21.00 and we have it implemented across 5 servers and it works great.

So, this newest version allow to set affinity for each process and I find this very intersting. We have done a lot of performance testing on a Dual Xeon 2.8 w/HT enabled and disabled Windows 2003 system running for HL2 srcds.exe processes gametype CSS and in general terms performance takes a hit with HT disabled, so we have it turned on. What I'd like to know is if it would be benificial to assign each of the 4 srcds.exe processes to certain cpus, and if so which ones?

for a dual proc with HT enabled what is cpu 0, cpu 1, cpu 2, and cpu 3 ? 0=real first cpu and 1=virtual first cpu and 2=real second cpu and 3=virtual second cpu ???

I'd just like to know if say we should maybe assign srcds1 and srcds2 process id's both to use affinity mask 0001 (CPU 1) and srcds3 and srcds4 to use affinity mask 0010 (CPU2), remember this is on a dual proc with HT enabled.

Thanks in advance for any clairification on this!

Lex
  
Reply With Quote
Re: Server loader and multiple CPUs
Old
  (#7)
botmeister
Ex-Council Member
 
botmeister's Avatar
 
Status: Offline
Posts: 1,090
Join Date: Nov 2003
Location: Canada
Default Re: Server loader and multiple CPUs - 03-05-2006

Good questions but I don't really have a good answer for you, although I'll give it a shot anyway.

My understanding of HT is that it fools the OS into thinking there are two CPU's instead of one (or 4 instead of 2 with a dual CPU system), so my assumption is that Windows will assign virtual CPU 0 & 1 to the physical CPU 0 and virtual CPU 2 & 3 to the physical CPU 1.

If I were to mix and match processes, I'd try and assign dissimilar processes to each virtual CPU on the same pysical CPU in an effort maximize idle time resource sharing (that's my understanding of what HT does).

If each process is the same (eg copies of an HL2 process) then I'd try and do load balancing by assigning (for example) a heavily used game and a less heavily used game to the same physical CPU (eg virtual CPU 1 & 2 or 3 & 4).

Nothing beats experimentation however, so the above is just my best guess without actually trying it out.

Now that I'm thinking about it, what may be useful is to allow the CPU assignments to be automatically adjusted based on load statistics in an effort to perform some kind of load balancing optimization. That would be kinda cool I think.


Maker of the (mEAn) Bot.Admin Manager

"In theory, there is no difference between theory and practice. But, in practice, there is." - Jan L.A. van de Snepscheut
  
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
vBulletin Skin developed by: vBStyles.com