1 (edited by name_scrubbed 2009-11-20 11:24:10)

Topic: [HELP] Only fourth core used on quadcore?!

Hi guys,

running a kinda huge bunch of teeworlds servers for some guys on debian 5 64bit.

Im wondering that only the last of the 4 cores gets its cpu high and the other lesser or nothing (probably by other services then teeworlds).

How do i make teeworlds use all the available resources instead of only one core? I did manually compiled it (bam server_release on twsrc after make_unix.sh).

Best wishes,
q23p

-Root Data-
Processor: AMD Opteron 1356
Cores: 4
Frequency: 4x 2.3 GHz
Ram: 8 GB
Type: DDR2 ECC (667 MHz)
Chipset: NVIDIA MCP55S
Network: NVIDIA, 1000 MBit
Traffic: Unmetered
Switchport: 100 MBit
Connection to outside: more then 100 GBit
Provider:    Deutsche Telekom, Level 3, Lambdanet, DeCIX
OS: Debian 5

RUNNING >24< TEEWORLDS SERVER WITH DETACHED SCREEN, thank god they were not full yet (would f*ck the one core probably).

My goal, if not able to distribute it automatically to all cpus, to put like 5 servers on one core each.

2 (edited by buffer[] 2009-11-18 11:06:38)

Re: [HELP] Only fourth core used on quadcore?!

Multiple core usage is a complicated thing that must be coded,
and there is no such thing in Teeworlds.
Sorry, but it's like most games, they don't use multiple core very well yet.

|ZPote| buffer[]'s posterous

3 (edited by Lanta 2009-11-18 14:58:54)

Re: [HELP] Only fourth core used on quadcore?!

Windows 7 Business 64bit build 7600, same problem... use only the 4th. (Intel Q9300)
I've never noticed that before... hmm

Support Staff - ESL.eu Teeworlds Admin

4 (edited by name_scrubbed 2009-11-18 15:23:22)

Re: [HELP] Only fourth core used on quadcore?!

Oww crap hmm. May i donate 50 bucks so some dev makes multicore version *g*?

So teeworlds is supposed to lag as hell when core 4 reaches max? Or what happens then?

5

Re: [HELP] Only fourth core used on quadcore?!

xD
Have you noticed that even in new games, only a few make a full usage of multiple cores ?
It's not an easy thing, and I don't think they'll do it.

|ZPote| buffer[]'s posterous

6

Re: [HELP] Only fourth core used on quadcore?!

hmm well ..
teeworlds 0.5.1 running on my windows 7 ultimate 64bit .. it uses all 4 cores (Intel Core 2 Quad Q6600 4x 2,4 GHz )
see screenshot:
http://img338.imageshack.us/img338/3145/teeworldsquadcore.png

Remember me? Questions? Just leave a message, I will respond within 72 hrs!

7 (edited by Lanta 2009-11-18 19:39:32)

Re: [HELP] Only fourth core used on quadcore?!

Dani wrote:

hmm well ..
teeworlds 0.5.1 running on my windows 7 ultimate 64bit .. it uses all 4 cores (Intel Core 2 Quad Q6600 4x 2,4 GHz )
see screenshot:
http://img338.imageshack.us/img338/3145/teeworldsquadcore.png

Maybe it's because you are running also other programs?
See that (0.5.2):
http://img.tee-city.net/images/cpuusage.png
Note that at the end, where the first 3 Cpu goes up and the fourth goes down, i minimized teeworlds.

Support Staff - ESL.eu Teeworlds Admin

8

Re: [HELP] Only fourth core used on quadcore?!

ehhh teeworlds cant use 42% of all cpus .. 1 core = max 25 % ..  see top of my screen .. only icq and teamspeak are running ...

Remember me? Questions? Just leave a message, I will respond within 72 hrs!

9 (edited by Lanta 2009-11-18 19:38:42)

Re: [HELP] Only fourth core used on quadcore?!

Dani wrote:

ehhh teeworlds cant use 42% of all cpus .. 1 core = max 25 % ..  see top of my screen .. only icq and teamspeak are running ...

Q6600... Bus 266 MHz ("Quadpumped") 2.4 GHz 65nm (2 die tecnology, 2 core/die, 4mb cache/die)
Q9300... Bus 333 MHz ("Quadpumped") 2.5 GHz 45nm (1 die tecnology, 4 core/die, 6mb cache for all cores) + SSE4
The difference it's simple: Q6600 = 2 dualcore, Q9300 = 1 quadcore. Maybe it's because of the 2-die tecnology? The 1-die tecnology and the shared cache increase performance. But maybe Teeworlds is less compatible.
We have the same operating system, so that's not the problem.
q23p got my same problem on Debian, so I think he got a q9300/q9450 or up (i7 and so on). What CPU have you got q23p?

Support Staff - ESL.eu Teeworlds Admin

10

Re: [HELP] Only fourth core used on quadcore?!

The teeworlds server never uses multiple cores. It can use it for some DNS lookup but nothing more then that. If you require multiple cores to run the server, something is wrong there already. The server isn't that intense that it needs to be threaded. It's just a waste of time.

11

Re: [HELP] Only fourth core used on quadcore?!

matricks wrote:

The teeworlds server never uses multiple cores. It can use it for some DNS lookup but nothing more then that. If you require multiple cores to run the server, something is wrong there already. The server isn't that intense that it needs to be threaded. It's just a waste of time.

q23p wrote:

Hi guys,

running a kinda huge bunch of teeworlds servers for some guys on debian 5 64bit.

Bolded the point. The idea is probably to get the multiple server processes to use different cores instead of just stacking up on core 4.

Failuree @ Quakenet

12

Re: [HELP] Only fourth core used on quadcore?!

Failure wrote:

Bolded the point. The idea is probably to get the multiple server processes to use different cores instead of just stacking up on core 4.

hmmm this sounds kinde great .. like:

servers 1-5 core 1
servers 6-10 use core 2
servers 11-15 use core 3
....

i know how to do this under windows with taskmanager.. but never tried/found with/on linux xD ...

Remember me? Questions? Just leave a message, I will respond within 72 hrs!

13 (edited by void 2009-11-20 07:01:15)

Re: [HELP] Only fourth core used on quadcore?!

Hm, the OS should really schedule that for you, unless the teeworlds code calls the equivalent of SetAffinity which  forces itself onto a specific core (which I highly doubt). How do you run all those servers? By some other managing process? Might be that some surrounding process forces them onto a core.

That one server or the client only uses one core is understandable, not much to do there without complicating things smile

Languages shapes the way we think, or don't.

14

Re: [HELP] Only fourth core used on quadcore?!

hmm on a dual core teeworlds uses both cores with 50% xD
anyway... im running some servers in ubuntu 64 bit and it uses both cores too... why should it only use 1 core ot of 4 than? oO
It makes no sense... for one server maybe but well... as void said... the OS should do that xD

btw... the racemod uses threads ^^

uptee - a simple web interface for hosting and maintaining teeworlds servers
teerace - a website gathering results of trusted Race-mod servers providing global ranking and statistics
*gV* rox ^^

15 (edited by name_scrubbed 2009-11-20 11:24:18)

Re: [HELP] Only fourth core used on quadcore?!

Heres the root data:

-Root Data-
Processor: AMD Opteron 1356
Cores: 4
Frequency: 4x 2.3 GHz
Ram: 8 GB
Type: DDR2 ECC (667 MHz)
Chipset: NVIDIA MCP55S
Network: NVIDIA, 1000 MBit
Traffic: Unmetered
Switchport: 100 MBit
Connection to outside: more then 100 GBit
Provider: Deutsche Telekom, Level 3, Lambdanet, DeCIX
OS: Debian 5

RUNNING >24< TEEWORLDS SERVER WITH DETACHED SCREEN, thank god they were not full yet (would f*ck the one core probably).

My goal, if not able to distribute it automatically to all cpus, to put like 5 servers on one core each.

Thanks to all and especially the hard working Devs for your time.

16

Re: [HELP] Only fourth core used on quadcore?!

Maybe try to start the servers without the screen crap xD

uptee - a simple web interface for hosting and maintaining teeworlds servers
teerace - a website gathering results of trusted Race-mod servers providing global ranking and statistics
*gV* rox ^^

17 (edited by name_scrubbed 2009-11-20 12:46:31)

Re: [HELP] Only fourth core used on quadcore?!

How is that possible? I don't think it is.

18

Re: [HELP] Only fourth core used on quadcore?!

Let the server start the servee for u wink
for me it would be too much work to start all servers via ssh in an extra screen.
Just use a simple script to start ur servers.

uptee - a simple web interface for hosting and maintaining teeworlds servers
teerace - a website gathering results of trusted Race-mod servers providing global ranking and statistics
*gV* rox ^^

19

Re: [HELP] Only fourth core used on quadcore?!

Well... the server would go off after closing the terminal.

20

Re: [HELP] Only fourth core used on quadcore?!

thats what i said... donst start the server via ssh xD
let the server start tw for u wink

for example u could do a cron job which will start the servers and additionally it could check if a server crashed and it could restart the server than automatically wink

uptee - a simple web interface for hosting and maintaining teeworlds servers
teerace - a website gathering results of trusted Race-mod servers providing global ranking and statistics
*gV* rox ^^

21

Re: [HELP] Only fourth core used on quadcore?!

k then gimme the commands plz.

crontab -e

(stuff to put in)

and crash recovery. Thanks.

22

Re: [HELP] Only fourth core used on quadcore?!

http://wiki.ubuntuusers.de/Cron
read this page wink
i would suggest to create a folder where all scripts in it will be run every minute wink

i found a script in internet for restart... it looks like this:

#! /bin/bash
numproc=4
a="config01.cfg config02.cfg config03.cfg"
if [ `ps -ef | grep -wc "teeworlds_srv"` -lt "$numproc" ]
then
    ps -ef | awk '/teeworlds_srv/ && !/awk/' > /tmp/$$
    if [ -s /tmp/$$ ]
    then
        for cfg in $a
        do
            grep $cfg /tmp/$$ > /dev/null
            if [ $? -ne 0 ]
            then
                  cd /to/the/teeworlds/folder/
          ./teeworlds_srv -f $cfg &
            fi
        done
    else
        for cfg in $a
        do
            cd /to/the/teeworlds/folder/
        ./teeworlds_srv -f $cfg &
        done
    fi
    rm /tmp/$$ 2> /dev/null
fi

exit 0

this script works... the numproc var has to be one bigger than the number of configs... u can fix this if u want but i dont care... it works xD

uptee - a simple web interface for hosting and maintaining teeworlds servers
teerace - a website gathering results of trusted Race-mod servers providing global ranking and statistics
*gV* rox ^^

23 (edited by name_scrubbed 2009-11-22 06:45:45)

Re: [HELP] Only fourth core used on quadcore?!

If i would let crontab run /path/to/teeworlds -f teeworlds.cfg all 15 minutes, it would only start it once, because after 30 minutes teeworlds stop with error port already in use, right? So its like a restart after max 15 minutes when crashed right.

But well i still got the core problem, so lets go on topic now smile.

24

Re: [HELP] Only fourth core used on quadcore?!

well the script checks if a process is running...
that with the core is strange... i thought it was a  problem cuz the server run as sub process (right word? :\) from screen xD

uptee - a simple web interface for hosting and maintaining teeworlds servers
teerace - a website gathering results of trusted Race-mod servers providing global ranking and statistics
*gV* rox ^^

25

Re: [HELP] Only fourth core used on quadcore?!

Well, the servers now restart after a minute, thanks for that. (using the dirty cron */1 minute method (since teeworlds ends with error when port used) lol)

Okay, it still goes to core 4. -_-.
WHY, WHYYYYY.