PennMUSH Community

Ticket #7649 (new incoming)

Opened 3 months ago

Disabling chunk swapping in config

Reported by: dbwiddis Assigned to:
Priority: minor Milestone:
Keywords: Cc:
Visibility: Public

Description

After a few weeks of troubleshooting and banging heads against walls, we've finally tracked down a CPU usage problem on our game to the chunk swapping. Our symptoms were very similar to those described in ticket #6558 (and researching that gave me clues on solving it.)

Essentially, the situation is:

- With default config settings for chunk swapping (chunk_cache_memory at 1000000 and chunk_migrate at 50) we experienced spikes of CPU usage approximately every 10 minutes up to about 20-30% Increasing chunk_cache_memory as the documentation indicated, caused these spikes to go up to 50-60%! And, decreasing it to the minimum indicated, 132000, still resulted in spikes in the 5-10% range.

- Using ticket 6558's information as guidance, I commented out the migrate_stuff call on line 220 of timer.c (1.8.2p8) and this dropped CPU usage to nearly zero.

While I'm glad that I was able to disable chunk swapping and the associated CPU drain, I really prefer to avoid hardcode hacks. I would like to be able to disable it using the mush.cnf file. Potential options would be:

- allow setting chunk_cache_memory to 0 or chunk_migrate to 0. If this currently works (makes logical sense), and doesn't break things (divide by zero?), the documentation should be changed to reflect it.

- explicitly have an option to disable it

I'm not sure if it's desirable to try to troubleshoot why chunk swapping is so bad on my system. If so, I'm happy to do whatever testing is desired.