TeensyMud - 'A ruby mud server.'

PerformanceNotes

Performance notes and observations

I haven't spent a whole lot of time looking at performance as it is too premature in the development process. I'll post observations on this page from time to time. My development box is a AMD K7 (700mhz) processor with 512M memory.

Speed

$ rake test  
.......
Finished in 5.826 seconds.  
152 tests, 245 assertions, 0 failures, 0 errors  

Memory

Just as a data point I loaded the Rom2.4b6 stock areas into tmud 2.7.0.

---* Database Statistics *---  
  Rooms   - 3126  
  Players - 1  
  Objects - 1265  
  Total Objects - 4392  
  Highest OID in use - 13055  
---*                     *---   

The virtual memory stood at around 18M after booting the above.

Profile

FirstPerformanceRun is the first stab at profiling the server. Previously this was not possible due to the way I implemented shutdown.

Date formatting

The Date class formatting uses Rational numbers for some reason and it really shows up (Integer#gcd). Excessive logging must be the culprit here as it's the only thing using it.

Database

Massive performance gains switching from yaml to marshal in serializing value fields in the Xdbms.

$ time ./dbload.rb -t gdbm -i db/dikubase 
Highest object in use   : 2438
Count of objects dumped : 910

real    0m12.257s
user    0m10.585s
sys     0m1.011s

$ time ./dbload.rb -t gdbm -i db/dikubase 
Highest object in use   : 2438
Count of objects dumped : 910

real    0m4.046s
user    0m2.703s
sys     0m1.021s