in reply to speeding up multi-player game with shared memory or MySQL

Also, any idea on how many people could be on a single dedicated server this way at one time before the server gets maxed out?

Completely unknown with the information you've given us. For example, the number of people who could use a single server if it was a P200 with 64Mb is completely different to the number of ppl who would saturate a 6 CPU, 2Gb E450. (you mention you use unix.)

One tip, mod_perl keeps database connections open. So the pain and suffering yours scripts go thru' to open a db-handle is done only once.

In this situation where you data must not be volatile (ie you should be able to recover after a machine failure) I think a database would be your best answer IMO. If tuned correctly, most of the data would be in memory, and the db engine will flush it when it needs to.

Instead of fragmenting your application into 100's of scripts check out CGI::Application.

  • Comment on Re: speeding up multi-player game with shared memory or MySQL

Replies are listed 'Best First'.
Re: Re: speeding up multi-player game with shared memory or MySQL
by dev2000 (Sexton) on Apr 21, 2002 at 22:18 UTC
    It's not exactly set yet, but I suppose it will be something like a single Pentium 4 > 1GHz > 512MB RAM and > 50Gb HD running mod_perl under FreeBSD...

    Also, under the hybrid scenario (temporary information -> shared memory & persistent information -> file IO) I don't think the temporary information in memory will be helpful after a server crash - everyone will time-out on the client side and have to restart anyway. Lets hope we dont crash often (are you listening FreeBSD?). Does this change your opinion on shared vs. DB? Thanks for the CGI::Application tip, I will check it out. -Dev
      I wouldnt like to make such a fundamental design decision for you simply because I dont know enuff about your application and considered design.

      Rule of thunb: If the information is non critical, volatile storage may be approprate. If your information is critical information, then i'd consider a more permananat storage method.