[Development] 4267 conquer server.

02/17/2010 14:00 Nullable#76
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 :p
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 ChingChong23#77
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 Nullable#78
Quote:
Originally Posted by ChingChong23 View Post
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 ChingChong23#79
Quote:
Originally Posted by Nullable View Post
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 Korvacs#80
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 ChingChong23#81
Quote:
Originally Posted by Korvacs View Post
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 Nullable#82
Quote:
Originally Posted by Korvacs View Post
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 Korvacs#83
Quote:
Originally Posted by Nullable View Post
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 :D
02/17/2010 17:24 Nullable#84
Quote:
Originally Posted by Korvacs View Post
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 :D
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 ImmuneOne#85
Random screenshot made while testing for bugs and such.

SHOPS!
02/17/2010 23:06 ArtOfWar#86
The progress is amazing ImmuneOne
When will the server become public?
02/17/2010 23:22 CIRASH#87
I love seeing this haha. Great job. keep up the good work.
02/17/2010 23:46 ImmuneOne#88
#UPDATE
-Equipping implemented, revising code now.
02/18/2010 05:14 hunterman01#89
I just like seeing SOMEONE who knows what they are doing
02/18/2010 10:55 Nullable#90
Database system might be changed later on, working on a custom piped database server: