Crystal Space
Welcome, Guest. Please login or register.
November 18, 2017, 06:40:50 pm

Login with username, password and session length
Search:     Advanced search
9081 Posts in 2051 Topics by 80407 Members
Latest Member: Xtromg
* Home Help Search Login Register
+  Crystal Space
|-+  Crystal Space Development
| |-+  Support
| | |-+  nettest
« previous next »
Pages: [1] Print
Author Topic: nettest  (Read 2218 times)
Posts: 22

View Profile
« on: October 24, 2006, 10:13:47 pm »

I know this question (or the generalized question about networking) has been asked but i have a quick one.

I have been trying for a while to see if i can get networking going. Like most others, i hadn't realized that i needed HawkNL to test the cel app.

I downloaded, built and installed Hawk and rebuilt cel. The nettest module works fine - well almost - for example purposes to get me started but i have a quick question.

This is what i have done....

Start the server:

./nettest -server -path=lev/terrainf -file=world

After this has started, the CPU usage goes through the roof. It's at a 100%.

Next i connect the client:

./nettest -client -player=Marc -serverhost=

All seems to go well and i can use the F1 and F2 tests as well. However, not been an expert at C++ i can't seem to find the reason why the CPU is at 100% on the server side.
The ping lists as the dreaded 999 - however, i can still move and eventually information is displayed. But the 100% CPU thing is killing me.

The code i am using is all recent SVN pulls from the last week.

Is this a known issue?? I know the code for the nettest is "as is" but i was wondering where i might have a look or what tool i might use to fix the problem (possibly Valgrind)?


Edit - I should also mention i am using Linux 32bit with an ATI card (Laptop). The Hawk lib is 1.7b. All of CS and CEL is from SVN last week.
« Last Edit: October 24, 2006, 10:16:07 pm by Phorem » Logged

« Reply #1 on: October 25, 2006, 07:49:53 am »

you don't need default opengl driver there then run server with --video=null
Posts: 22

View Profile
« Reply #2 on: October 25, 2006, 06:04:44 pm »

I tried that, still at 100%. I guess i will have to look harder to why 100% of the processor is needed to run a couple tcp sockets smiley
Posts: 7

View Profile WWW Email
« Reply #3 on: October 25, 2006, 07:29:32 pm »

Though it may not help, you may want to see my example in this thread:,1236.msg5716.html#msg5716

Jr. Member
Posts: 62

View Profile
« Reply #4 on: October 25, 2006, 11:10:49 pm »

i noticed this behaviour from the testprogram that comes with the HawkNL package, namely with the Test_clientserver test.

The server thread of this test program polls the socketgroup with a timeout of 0
        count = nlPollGroup(group, NL_READ_STATUS, s, MAX_CLIENTS, 0);
This causes a 100% cpu load of the server thread
If the timeout is changed to e.g. 1 (specified in msec) the cpu-load will drop
        count = nlPollGroup(group, NL_READ_STATUS, s, MAX_CLIENTS, 1);

So check the CEL net-testcode for the nlPollGroup method...
Pages: [1] Print 
« previous next »
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.2 | SMF © 2006-2007, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
Page created in 8.249 seconds with 18 queries.