Hi there, been playing with mods and FTB for a while but pretty new to these forums.
Anyways, I have discovered an issue with HQM. I've looked around and seen people complaining about this symptom, but haven't seen anyone connect the symptom to this issue. I apologize beforehand if this issue is already known of.
Issue Summary: A large(er) players.dat file (such as the one packed with the AS SMP server) causes there to be significant server overhead/lag even when the server is otherwise completely idle.
Issue Details: Here are the symptoms and then the fix which lead me the conclusion HQM is at fault.
I downloaded the server completely fresh and ran it. Before anyone got on and started building anything, my console was being spammed with a wall of "[WARNING] Can't keep up." Oddly enough, the warnings seemed very consistent, occurring right around 45 seconds between each other. Also, during these lag spikes was the typical slow inventory opening, item updates, etc. issues. See screen1.
I loaded up Opis client side to check if something IN the map was eating up resources and causing the server to lag spike. In the Opis console window, there was no abnormally high tps or anything eating resources ON the server, but the ping graph spike coincided with the server window's warnings. The server and client were ran locally, so the ping wouldn't be caused by a network issue. See screen2.
I also tried all of these, none of which helped:
- Running the server and nothing else intensive on my computer.
- Disabling server side utility mods (Opis and aroma backup).
- Editing server launch parameters for xms/xmx/permsize.
- Increasing process priority via task manager.
- Updating java (from 7u45 to 7u60. 64-bit versions, of course).
- Restarting my computer.
Solution: Then, I don't know what caused me to have this idea, but I went into the world save folder and
deleted players.dat under in HardcoreQuesting. I launched the server again, the issue was resolved. The prepacked players/teams that come in the AS SMP server save seem to have been the issue. I suspect HQM tries to read/write/backup this every 45 seconds, but larger files = poorer performance, thus lag spikes.
Downsides of this solution: This solution comes at 2 downsides:
- When the server is launched again, HQM's quest mode and hardcore mode are disabled by default when it doesn't find there to be a players.dat file. This is actually fixed easily by typing "hqm quest" and "hqm hardcore" in the server window, WITHOUT logging in.
- ALL player stats and quest progress gets wiped. That makes this fix not practical on servers where people have already been playing for a while. It is possible to edit the quest progress of each team with op commands, then spawn in items to get their partial progress back to what it was, but that would be extremely tedious.
For servers that actually have 20-30+ players playing it, I guess this would be a persistant issue and there wouldn't be a solution at all.
Additional Details and Comments:
Intel Q6600 (2.4 GHz quad core)
8GB DDR2
Windows 7 Ultimate
Western Digital Black 1TB HDD
I feel like this issue might be a bit more pronounced on my system since I have a slightly weaker processor, slower ram, and slower file access (compared to SSDs) than the newer computers nowadays. But I do think it affects all servers to some extent.
I have attached the blank players.dat (with quest and hardcore mode already enabled). You may want to consider replacing the players.dat files in both the SSP and SMP map saves for future downloads with this one. I saw that you, jadedcat, were also in the quest book on the SSP saves, but if the HQM mod is choking on a 75kB file, each byte removed could be significant in improving performance.
Another possible solution would be to individually delete players and teams, but as far as I have seen, there is no way to do that both with in game op commands nor editing the players.dat file (since it's saved in a serializable formating I'm guessing that only it can read)