m0dg0d 1 Posted February 12, 2014 Hello, My arma2 server uses only %25 of total processor. My server specs: E3-1240v2 , 16gb ram, 2x 240SSD , 1gbps Running Ubuntu. Is there any parameter to set it to 4 cores? Share this post Link to post Share on other sites
SavageCDN 231 Posted February 12, 2014 https://community.bistudio.com/wiki/Arma2:_Startup_Parameters#cpuCount Share this post Link to post Share on other sites
m0dg0d 1 Posted February 12, 2014 https://community.bistudio.com/wiki/Arma2:_Startup_Parameters#cpuCount Thanks for your help, but these commands arent working in my arma2server config. heres my config: #!/bin/bash# # armaserver: ArmA 2 Linux Dedicated Server Control Script # © 2011 BIStudio # ArmA 2 binary version must be 1.04 or later # #======================================================================= #======== CONFIGURATION PARAMETERS ======== #======== MUST BE EDITED MANUALLY TO FIT YOUR SYSTEM PARAMETERS ======== #======================================================================= ARMA_DIR=HIDDEN CONFIG=HIDDEN PORT=2302 PIDFILE=${ARMA_DIR}/${PORT}.pid RUNFILE=${ARMA_DIR}/${PORT}.run LOGFILE=${ARMA_DIR}/log.${PORT}.txt SERVER=${ARMA_DIR}/server CPUCOUNT=4 MAXMEM=2047 NOLOGS #======================================================================= ulimit -c 1000000 case "$1" in start) if [ -f ${RUNFILE} ]; then $0 stop fi echo "Starting ArmA 2 server..." # file to mark we want server running... echo "go" >${RUNFILE} # launch the background watchdog process to run the server nohup </dev/null >/dev/null $0 watchdog & ;; stop) echo "Stopping ArmA 2 server..." if [ -f ${RUNFILE} ]; then # ask watcher process to exit by deleting its runfile... rm -f ${RUNFILE} fi # and terminate ArmA 2 server process if [ -f ${PIDFILE} ]; then kill -TERM $(< ${PIDFILE}) if [ -f ${PIDFILE} ]; then rm -f ${PIDFILE} fi fi ;; status) if [ -f ${RUNFILE} ]; then echo "Server should be running..." else echo "Server should not be running..." fi if [ -f ${PIDFILE} ]; then PID=$(< ${PIDFILE}) echo "PID file exists (PID=${PID})..." if [ -f /proc/${PID}/cmdline ]; then echo "Server process seems to be running..." fi fi ;; check) echo -n "ArmA 2 directory: ${ARMA_DIR} " if [ -d ${ARMA_DIR} ]; then echo "OK" else echo "MISSING!" fi echo -n "Server executable: ${SERVER} " if [ -x ${SERVER} ]; then echo "OK" else echo "ERROR!" fi echo "Port number: ${PORT}" echo -n "Config file: ${CONFIG} " if [ -f ${CONFIG} ]; then echo "OK" else echo "MISSING!" fi echo "PID file: ${PIDFILE}" echo "RUN file: ${RUNFILE}" ;; restart) $0 stop $0 start ;; watchdog) # this is a background watchdog process. Do not start directly while [ -f ${RUNFILE} ]; do # launch the server... cd ${ARMA_DIR} echo >>${LOGFILE} "WATCHDOG ($$): [$(date)] Starting server (port ${PORT})..." ${SERVER} >>${LOGFILE} 2>&1 -server -config=${CONFIG} -port=${PORT} -pid=${PIDFILE} if [ -f ${RUNFILE} ]; then echo >>${LOGFILE} "WATCHDOG ($$): [$(date)] Server died, waiting to restart..." sleep 5s else echo >>${LOGFILE} "WATCHDOG ($$): [$(date)] Server shutdown intentional, watchdog terminating" fi done ;; *) echo "$0 (start|stop|restart|status|check)" ;; esac Share this post Link to post Share on other sites
SavageCDN 231 Posted February 12, 2014 It will never use 4 cores - 2 are the max. One for AI processing and the other for server stuff. Also you may laugh cause I'm useless in Linux but I don't see the cpucount param being used in your loop? Share this post Link to post Share on other sites
m0dg0d 1 Posted February 12, 2014 It will never use 4 cores - 2 are the max. One for AI processing and the other for server stuff.Also you may laugh cause I'm useless in Linux but I don't see the cpucount param being used in your loop? ARMA_DIR=HIDDEN CONFIG=HIDDEN PORT=2302 PIDFILE=${ARMA_DIR}/${PORT}.pid RUNFILE=${ARMA_DIR}/${PORT}.run LOGFILE=${ARMA_DIR}/log.${PORT}.txt SERVER=${ARMA_DIR}/server CPUCOUNT=4 <<<<<<<<<<<<<<<<<<<<<<< MAXMEM=2047 NOLOGS Share this post Link to post Share on other sites
redshirt_ensign 11 Posted February 13, 2014 ARMA_DIR=HIDDEN CONFIG=HIDDEN PORT=2302 PIDFILE=${ARMA_DIR}/${PORT}.pid RUNFILE=${ARMA_DIR}/${PORT}.run LOGFILE=${ARMA_DIR}/log.${PORT}.txt SERVER=${ARMA_DIR}/server CPUCOUNT=4 <<<<<<<<<<<<<<<<<<<<<<< MAXMEM=2047 NOLOGS All that stuff is just ENV vars that are being set into the shell that the script is running in. Some of them then get used as command line parameters in the actual bit of the script that runs the server binary: ${SERVER} >>${LOGFILE} 2>&1 -server -config=${CONFIG} -port=${PORT} -pid=${PIDFILE} As you can see, only SERVER (the binary), LOGFILE, CONFIG, PORT and PIDFILE are being used. Just setting ENV vars isn't enough for the server to know about them, you need to actually submit them as params to the "server" binary. Where did you get that start script anyway? Both the current 1.63 Linux and even the previous 1.62 Linux bundle uses a start script that has an ENV called OTHERPARAMS (which is included in the command line call to server) and by default it includes the "-cpucount=2" param already: #======================================================================= #======== CONFIGURATION PARAMETERS ======== #======== MUST BE EDITED MANUALLY TO FIT YOUR SYSTEM PARAMETERS ======== #======================================================================= ARMA_DIR= CONFIG= PORT=2302 PIDFILE=${ARMA_DIR}/${PORT}.pid RUNFILE=${ARMA_DIR}/${PORT}.run LOGFILE=${ARMA_DIR}/log.${PORT}.txt SERVER=${ARMA_DIR}/server OTHERPARAMS=-cpucount=2 #======================================================================= and ${SERVER} >>${LOGFILE} 2>&1 -server -config=${CONFIG} -port=${PORT} -pid=${PIDFILE} [b]${OTHERPARAMS}[/b] Although for yours (based on the params you seem to want) I would make that OTHERPARAMS="-cpucount=2 -maxMem=2047 -nologs" Lastly, as Savage already pointed out, you will only ever get the 2nd core to be used for AI threads, so don't be alarmed if you first start the server and still only see 1 core getting constantly thrashed at 100%, the 2nd core will start fluctuating up to more and more usage as the need for AI processing occurs. This is why the optimal server for Arma 2 is to have a very high clocked dual core (or quad since that leaves some cores to run mysql and/or the rest of the OS) running on dedicated hardware with no hyperthreading or any other potential drain on pure uninterrupted access to that 1 single core that is doing almost all the work. Hope this helps :) Share this post Link to post Share on other sites
m0dg0d 1 Posted February 13, 2014 All that stuff is just ENV vars that are being set into the shell that the script is running in. Some of them then get used as command line parameters in the actual bit of the script that runs the server binary:${SERVER} >>${LOGFILE} 2>&1 -server -config=${CONFIG} -port=${PORT} -pid=${PIDFILE} As you can see, only SERVER (the binary), LOGFILE, CONFIG, PORT and PIDFILE are being used. Just setting ENV vars isn't enough for the server to know about them, you need to actually submit them as params to the "server" binary. Where did you get that start script anyway? Both the current 1.63 Linux and even the previous 1.62 Linux bundle uses a start script that has an ENV called OTHERPARAMS (which is included in the command line call to server) and by default it includes the "-cpucount=2" param already: #======================================================================= #======== CONFIGURATION PARAMETERS ======== #======== MUST BE EDITED MANUALLY TO FIT YOUR SYSTEM PARAMETERS ======== #======================================================================= ARMA_DIR= CONFIG= PORT=2302 PIDFILE=${ARMA_DIR}/${PORT}.pid RUNFILE=${ARMA_DIR}/${PORT}.run LOGFILE=${ARMA_DIR}/log.${PORT}.txt SERVER=${ARMA_DIR}/server OTHERPARAMS=-cpucount=2 #======================================================================= and ${SERVER} >>${LOGFILE} 2>&1 -server -config=${CONFIG} -port=${PORT} -pid=${PIDFILE} [b]${OTHERPARAMS}[/b] Although for yours (based on the params you seem to want) I would make that OTHERPARAMS="-cpucount=2 -maxMem=2047 -nologs" Lastly, as Savage already pointed out, you will only ever get the 2nd core to be used for AI threads, so don't be alarmed if you first start the server and still only see 1 core getting constantly thrashed at 100%, the 2nd core will start fluctuating up to more and more usage as the need for AI processing occurs. This is why the optimal server for Arma 2 is to have a very high clocked dual core (or quad since that leaves some cores to run mysql and/or the rest of the OS) running on dedicated hardware with no hyperthreading or any other potential drain on pure uninterrupted access to that 1 single core that is doing almost all the work. Hope this helps :) Its working!, Thank you so much!! Share this post Link to post Share on other sites