|
You last visited: Today at 19:23
Advertisement
[Development] 4267 conquer server.
Discussion on [Development] 4267 conquer server. within the CO2 Private Server forum part of the Conquer Online 2 category.
02/17/2010, 14:00
|
#76
|
elite*gold: 0
Join Date: Nov 2009
Posts: 390
Received Thanks: 321
|
UPDATE:
Increased overall server performance using ThreadPools, tested and proven that overall performance has been increased to reach less than 1 millisecond to load a character:
Tested many times to assure the results 
Test Result #1 without threadpooling:
Quote:
|
[TEST]Without ThreadPooling, it took: 16 milliseconds to load the character.
|
Test Result #2 with threadpooling:
Quote:
|
[TEST]With ThreadPooling, it took: 0 milliseconds to load the character.
|
Results are way different as you guys can see, although i can't count on a 0 millisecond but of course there is a fraction, which due to the int value being rounded
Garbage Collector results about memory usage:
Quote:
|
[CPX-Global] GC: "Allocated 14 megabytes on heap".
|
PrivateMemorySize64 results about memory usage:
Quote:
|
[CPX-Global] Allocated 51 megabytes on heap.
|
Now which one should i rely on? provided that both tests occur at the same point after loading the database in the server
|
|
|
02/17/2010, 14:53
|
#77
|
elite*gold: 0
Join Date: Feb 2006
Posts: 550
Received Thanks: 82
|
What type of database are you using? because 16 milliseconds is a lot, i hope it's not flatfile. On a single thread it took 82ms for me to load 400 characters so maybe your doing something wrong?
|
|
|
02/17/2010, 14:58
|
#78
|
elite*gold: 0
Join Date: Nov 2009
Posts: 390
Received Thanks: 321
|
Quote:
Originally Posted by ChingChong23
What type of database are you using? because 16 milliseconds is a lot, i hope it's not flatfile. On a single thread it took 82ms for me to load 400 characters so maybe your doing something wrong?
|
It's flatfile, and nothing is wrong everything is pinvoked from win API correctly, basically this is calculated after loading the character info, items, inventory, and sending all the login packets to the client...
|
|
|
02/17/2010, 15:00
|
#79
|
elite*gold: 0
Join Date: Feb 2006
Posts: 550
Received Thanks: 82
|
Quote:
Originally Posted by Nullable
It's flatfile, and nothing is wrong everything is pinvoked from win API correctly, basically this is calculated after loading the character info, items, inventory, and sending all the login packets to the client...
|
oh i thought you meant just parsing the data from the file and nothing more, my bad.
|
|
|
02/17/2010, 15:04
|
#80
|
elite*gold: 20
Join Date: Mar 2006
Posts: 6,126
Received Thanks: 2,518
|
Im not sure that your tests are accurate, just because you switch from none threadpooling, to threadpooling doesnt mean that accessing your database should be any faster. Ultimately you should still have 1 thread accessing and getting the information from the database and returning. The only difference being is that this thread is allocated the task, and then the thread is recycled.
When ive fixed my pipeserver, which im in the middle of rebuilding then ill post an example to better explain myself.
|
|
|
02/17/2010, 15:11
|
#81
|
elite*gold: 0
Join Date: Feb 2006
Posts: 550
Received Thanks: 82
|
Quote:
Originally Posted by Korvacs
Im not sure that your tests are accurate, just because you switch from none threadpooling, to threadpooling doesnt mean that accessing your database should be any faster. Ultimately you should still have 1 thread accessing and getting the information from the database and returning. The only difference being is that this thread is allocated the task, and then the thread is recycled.
|
i was thinking the same thing, it does seem inaccurate.
|
|
|
02/17/2010, 15:16
|
#82
|
elite*gold: 0
Join Date: Nov 2009
Posts: 390
Received Thanks: 321
|
Quote:
Originally Posted by Korvacs
Im not sure that your tests are accurate, just because you switch from none threadpooling, to threadpooling doesnt mean that accessing your database should be any faster. Ultimately you should still have 1 thread accessing and getting the information from the database and returning. The only difference being is that this thread is allocated the task, and then the thread is recycled.
When ive fixed my pipeserver, which im in the middle of rebuilding then ill post an example to better explain myself.
|
The difference is, the main thread running the server is already too busy, running 3 bound sockets, loaded npc scripts, loaded monster generators, checking if monster generators have to be regenerated or not, so from my point of view it seems pretty logical that the tests might be accurate..
EDIT:
Retested it 10 more times, results varied from a 7 - 9 milliseconds difference between both methods
|
|
|
02/17/2010, 16:37
|
#83
|
elite*gold: 20
Join Date: Mar 2006
Posts: 6,126
Received Thanks: 2,518
|
Quote:
Originally Posted by Nullable
The difference is, the main thread running the server is already too busy, running 3 bound sockets, loaded npc scripts, loaded monster generators, checking if monster generators have to be regenerated or not, so from my point of view it seems pretty logical that the tests might be accurate..
EDIT:
Retested it 10 more times, results varied from a 7 - 9 milliseconds difference between both methods
|
Well:
Code:
[GameServer] Starting Socket Server
[GameServer] Listening on port 5816
Task Appears to Complete in 0ms
Task Atually Completed in 234ms
Task Appears to Complete in 0ms
Task Atually Completed in 0ms
Task Appears to Complete in 0ms
Task Appears to Complete in 0ms
Task Atually Completed in 0ms
Task Atually Completed in 0ms
Task Appears to Complete in 0ms
Task Atually Completed in 0ms
Task Appears to Complete in 0ms
Task Appears to Complete in 0ms
Task Atually Completed in 0ms
Task Atually Completed in 0ms
Task Appears to Complete in 0ms
Task Atually Completed in 0ms
Task Appears to Complete in 0ms
[GameServer] Korvacs[PM]: Login Complete
Task Atually Completed in 0ms
Task Appears to Complete in 0ms
Task Atually Completed in 0ms
Task Appears to Complete in 0ms
Task Atually Completed in 0ms
Something you should be aware of anyways, the "Task Appears to complete" is performed outside the task thread, "Task Atually Completed in" is made inside the task thread. The only one of any real value here is the first one, but there you go.
Edit: Oh and i fixed my pipeserver so i can carry on with development
|
|
|
02/17/2010, 17:24
|
#84
|
elite*gold: 0
Join Date: Nov 2009
Posts: 390
Received Thanks: 321
|
Quote:
Originally Posted by Korvacs
Well:
Code:
[GameServer] Starting Socket Server
[GameServer] Listening on port 5816
Task Appears to Complete in 0ms
Task Atually Completed in 234ms
Task Appears to Complete in 0ms
Task Atually Completed in 0ms
Task Appears to Complete in 0ms
Task Appears to Complete in 0ms
Task Atually Completed in 0ms
Task Atually Completed in 0ms
Task Appears to Complete in 0ms
Task Atually Completed in 0ms
Task Appears to Complete in 0ms
Task Appears to Complete in 0ms
Task Atually Completed in 0ms
Task Atually Completed in 0ms
Task Appears to Complete in 0ms
Task Atually Completed in 0ms
Task Appears to Complete in 0ms
[GameServer] Korvacs[PM]: Login Complete
Task Atually Completed in 0ms
Task Appears to Complete in 0ms
Task Atually Completed in 0ms
Task Appears to Complete in 0ms
Task Atually Completed in 0ms
Something you should be aware of anyways, the "Task Appears to complete" is performed outside the task thread, "Task Atually Completed in" is made inside the task thread. The only one of any real value here is the first one, but there you go.
Edit: Oh and i fixed my pipeserver so i can carry on with development 
|
Yeah i forgot about that o.O, but my counts were not just like, i register the callback and then check the count after that, i actually checked the count inside the callback just before the last bracket, and congratulations!
|
|
|
02/17/2010, 17:48
|
#85
|
elite*gold: 0
Join Date: Nov 2009
Posts: 754
Received Thanks: 544
|
Random screenshot made while testing for bugs and such.
SHOPS!
|
|
|
02/17/2010, 23:06
|
#86
|
elite*gold: 40
Join Date: Feb 2010
Posts: 78
Received Thanks: 17
|
The progress is amazing ImmuneOne
When will the server become public?
|
|
|
02/17/2010, 23:22
|
#87
|
elite*gold: 0
Join Date: Jul 2008
Posts: 259
Received Thanks: 73
|
I love seeing this haha. Great job. keep up the good work.
|
|
|
02/17/2010, 23:46
|
#88
|
elite*gold: 0
Join Date: Nov 2009
Posts: 754
Received Thanks: 544
|
#UPDATE
-Equipping implemented, revising code now.
|
|
|
02/18/2010, 05:14
|
#89
|
elite*gold: 20
Join Date: Dec 2006
Posts: 945
Received Thanks: 175
|
I just like seeing SOMEONE who knows what they are doing
|
|
|
02/18/2010, 10:55
|
#90
|
elite*gold: 0
Join Date: Nov 2009
Posts: 390
Received Thanks: 321
|
Database system might be changed later on, working on a custom piped database server:
|
|
|
All times are GMT +1. The time now is 19:24.
|
|