Page 1 of 1

A problem on the linux server

Posted: Thu Sep 22, 2016 3:24 am
by lostgost
Hi,
i'm a chinese player and sorry about that my english is just soso.
I have set up a server on CentOS_7.2 some days ago
But I find some problem on my server
The game processes only use one CPU core , other 3 core used less than 1%
So if one core used by 100% , Server be came very slow and server program may be crash

This is my server's info
CPU:Intel(R) Xeon(R) CPU E5-2420 0 @ 1.90GHz, 4 cores,
RAM:3534MB
OS:CentOS 7.2

and this is my start sh:

#!/bin/bash
SAVE_NAME="guoguo_map"
SAVE_MAP="${SAVE_NAME}.zip"
SET_PARM1="--autosave-interval 30"
SET_PARM2="--autosave-slots 3"
SET_PARM3="--allow-commands admins-only"
SET_PARM4="--port 2333"
SET_PARM5="--server-settings data/server-settings.example.json"
MAIN_DIR="/home/factorio/factorio"
SET_PARM6="--config ${MAIN_DIR}/config/config.ini"
EXEC_BIN="${MAIN_DIR}/bin/x64/factorio"
EXEC_ARGS="${SET_PARM1} ${SET_PARM2} ${SET_PARM3} ${SET_PARM4} ${SET_PARM5} ${SET_PARM6}"
AUTOSAVE_DIR="${MAIN_DIR}/saves"
echo "### Sever starting...­"
LATEST_MAP=`ls -t ${AUTOSAVE_DIR}/*.zip 2> /dev/null | head -1`
echo "### Latest autosave map: ${LATEST_MAP}"
if [ "${LATEST_MAP}" == "${AUTOSAVE_DIR}/${SAVE_MAP}" ]; then
echo "### Using origin map: ${LATEST_MAP}"
else
echo "###Using latest map: ${LATEST_MAP}"
mv ${LATEST_MAP} ${AUTOSAVE_DIR}/${SAVE_MAP}
fi
if [ ! -f ${AUTOSAVE_DIR}/${SAVE_MAP} ]; then
echo "### Create a new map: ${SAVE_MAP}"
${EXEC_BIN} --create ${AUTOSAVE_DIR}/${SAVE_MAP}
fi
${EXEC_BIN} --start-server ${AUTOSAVE_DIR}/${SAVE_MAP} ${EXEC_ARGS} $@



please help me~~

[0.14.7]~[0.14.8] A problem about server on multi-core cpu

Posted: Thu Sep 22, 2016 7:13 am
by lostgost
Hi,
i'm a chinese player and sorry about that my english is just soso.

I have set up a server on CentOS_7.2 some days ago
But I find some problem on my server
The game processes only use one CPU core , other 3 core used less than 1%
So if one core used by 100% , Server became very slow and the program may be crash
1.png
1.png (31.39 KiB) Viewed 1331 times
This is my server's info
CPU:Intel(R) Xeon(R) CPU E5-2420 0 @ 1.90GHz, 4 cores,
RAM:3534MB
OS:CentOS 7.2
GameVer:0.14.8
The service "irqbalance" is started

And this is my start sh:

Code: Select all

#!/bin/bash
SAVE_NAME="guoguo_map"
SAVE_MAP="${SAVE_NAME}.zip"
SET_PARM1="--autosave-interval 30"
SET_PARM2="--autosave-slots 3"
SET_PARM3="--allow-commands admins-only"
SET_PARM4="--port 2333"
SET_PARM5="--server-settings data/server-settings.example.json"
MAIN_DIR="/home/factorio/factorio"
SET_PARM6="--config ${MAIN_DIR}/config/config.ini"
EXEC_BIN="${MAIN_DIR}/bin/x64/factorio"
EXEC_ARGS="${SET_PARM1} ${SET_PARM2} ${SET_PARM3} ${SET_PARM4} ${SET_PARM5} ${SET_PARM6}"
AUTOSAVE_DIR="${MAIN_DIR}/saves"
echo "### Sever starting...­"
LATEST_MAP=`ls -t ${AUTOSAVE_DIR}/*.zip 2> /dev/null | head -1`
echo "### Latest autosave map: ${LATEST_MAP}"
if [ "${LATEST_MAP}" == "${AUTOSAVE_DIR}/${SAVE_MAP}" ]; then
echo "### Using origin map: ${LATEST_MAP}"
else
echo "### Using latest map: ${LATEST_MAP}"
mv ${LATEST_MAP} ${AUTOSAVE_DIR}/${SAVE_MAP}
fi
if [ ! -f ${AUTOSAVE_DIR}/${SAVE_MAP} ]; then
echo "### Create a new map: ${SAVE_MAP}"
${EXEC_BIN} --create ${AUTOSAVE_DIR}/${SAVE_MAP}
fi
${EXEC_BIN} --start-server ${AUTOSAVE_DIR}/${SAVE_MAP} ${EXEC_ARGS} $@


please help me~~

Re: [0.14.7]~[0.14.8] A problem about server on multi-core cpu

Posted: Thu Sep 22, 2016 12:17 pm
by orzelek
It's working at intended.
Game simulation is run on one thread only currently so it will run on one core only.
There are some plans for 0.15 to add multithreading for parts of simulation.

Re: A problem on the linux server

Posted: Thu Sep 22, 2016 5:02 pm
by Smarty
merged with same topic

please dont post twice