RPoL’s been extremely hard on the server it shares, utilising quite a bit of the CPU (and I’d guess other resources).

I’ve been thinking that I should probably move off Berkeley DB, so I decided to port the user database to a mySQL one.  I then ran some benchmark tests to see how much better one was from the other;

Benchmark: timing 1 iterations of 1 mySQL, 2 Berkeley...

   1 mySQL:  5 wallclock secs ( 2.10 usr +  0.30 sys =  2.40 CPU) @  0.42/s

2 Berkeley:  1 wallclock secs ( 0.67 usr +  0.23 sys =  0.90 CPU) @  1.11/s

Both benchmarks read in 10,000 random user DB entries one by one, with Berkeley DB showing it’s some 5 times faster…

So now my current thought is along the lines of the fact that each game has it’s own lil Berkeley DB for the public threads in it, and another for the private threads… and then one per user in the game for their private threads.  Each of these lil DB’s is its own file, so maybe it’s all the file opening and closing… perhaps mySQL would come into it’s own when it’s just one open DB with the above mentioned thread stuff in a table each.

Why can’t some DB expert see my plight and decide I’m in need of rescuing?!

I shall now commence the beating of my head against a wall.