• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

TheForgottenServer

lucas50

New Member
Joined
Oct 5, 2009
Messages
5
Reaction score
0
Hey all,

TFS (rev. 3777) works with multicore processor?

Well, from what I saw, many say that does not work, but I found a "code" that seems to work, give a look and tell me if it works:

Code:
#!/bin/bash
# CCache + multicore compilation script by Stian
# For "The Forgotten Server"

# Example:
# # make clean
# # time ./build.sh

# Gives:
# real  3m27.070s
# user  6m4.066s
# sys   0m16.659s

# CCACHE recompile (from scratch):
# # make clean
# # time ./build.sh

# Gives:
# real  0m27.620s
# user  0m43.744s
# sys   0m4.766s

# 1/7 of the original compile time!
# When more you do it, more ccache will cache, default is limited to use 1GB storage

echo "TheForgottenServer build script- seems to speed things up ALOT."
# Enable CCache
if test -x `which ccache`; then
        echo "CCache: OK"
        if [ -f /usr/lib/ccache/bin ]; then
                export PATH=/usr/lib/ccache/bin/:$PATH
                echo "CCache binaries located in /usr/lib/ccache/bin"
        else
                export PATH=/usr/lib/ccache/:$PATH
                echo "CCache binaries located in /usr/lib/ccache"
        fi
else
        echo "CCache: Not installed"
fi

# Get number cores
CORES=`grep processor /proc/cpuinfo | wc -l`
# Set make processes - 1 + number of cores
MAKEOPT=$(($CORES + 1))

echo "Building on $CORES cores, using $MAKEOPT processes"
make -j $MAKEOPT
 
I think it somehow takes values from config.lua or simply doesn't work/work as default(or need untold to anyone compiler parameter?)
Code:
	-- Process
	-- NOTE: daemonize works only on *nix, same as niceLevel, while
	-- defaultPriority works only on Windows.
	-- coresUsed are seperated by comma cores ids used by server process,
	-- default is -1, so it stays untouched (automaticaly assigned by OS).
	daemonize = false
	defaultPriority = "high"
	niceLevel = 5
	serviceThreads = 1
	coresUsed = "-1"
 
Back
Top