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

Anything that prevents you from playing the game properly. Do you have issues playing for the game, downloading it or successfully running it on your computer? Let us know here.
Post Reply
lostgost
Manual Inserter
Manual Inserter
Posts: 2
Joined: Thu Sep 22, 2016 3:01 am
Contact:

A problem on the linux server

Post 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~~

lostgost
Manual Inserter
Manual Inserter
Posts: 2
Joined: Thu Sep 22, 2016 3:01 am
Contact:

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

Post 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 1237 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~~

orzelek
Smart Inserter
Smart Inserter
Posts: 3911
Joined: Fri Apr 03, 2015 10:20 am
Contact:

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

Post 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.

User avatar
Smarty
Global Moderator
Global Moderator
Posts: 816
Joined: Sat Oct 04, 2014 5:00 pm
Contact:

Re: A problem on the linux server

Post by Smarty »

merged with same topic

please dont post twice

Post Reply

Return to “Technical Help”