A problem on the linux server
Posted: Thu Sep 22, 2016 3:24 am
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~~
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~~