ID:2836284
 
BYOND Version:514
Operating System:Linux
Web Browser:Chrome 107.0.0.0
Applies to:Dream Daemon
Status: Open

Issue hasn't been assigned a status value.
Descriptive Problem Summary:

For a whole, I (Paradise) have had this issue where DD performance on Linux just sorta, sucked. The CPU usage and similar would be down at acceptable limits, but the game would be full of microstutters and impossible to play fluidly.

Our Russian downstream (who deserves all the credit for this, big shoutout to azisonkg) realised that linux DD does a ton of file IO constantly to .byond/cfg/ban.txt

https://i.imgur.com/JlFVSuA.png

This then led me to believe that this constant file writing was behind the game stutters, since File IO would be a blocking operation but wouldnt cause the CPU to be 100% loaded

https://i.imgur.com/2s9wA7L.png

Link to our world/IsBanned() call if it gives any pointers: https://github.com/ParadiseSS13/Paradise/blob/master/code/ modules/admin/IsBanned.dm

Numbered Steps to Reproduce Problem:

Not entirely sure. This has always been a difficult issue to check due to the fact it only seemed to occur for us, which I used to just think was Linux DD not liking >120 people on the same server, however, I can now believe otherwise.


Expected Results:

Not constant file writes with this

Actual Results:

This

Does the problem occur:
Every time? Or how often? Yes
In other games? No idea
In other user accounts? No idea
On other computers? Not on windows

When does the problem NOT occur?

Not on windows

Did the problem NOT occur in any earlier versions? If so, what was the last version that worked? (Visit http://www.byond.com/download/build to download old versions for testing.)

This was an issue all the way back in 2017 according to our host at the time

Workarounds:

- Use windows
- Make the ban file immutable as SS220 did
Your linked IsBanned() code doesn't do anything that would cause a write. I don't actually see anything that would explain frequent writes.
I mentioned this to you a bit back on Discord, noticed the same thing on Eternia and we don't even have IsBanned() in our code. I don't think it's writing any actual data, just opening the file and writing nothing, closing the file, and doing it a lot.
In response to Lummox JR
Lummox JR wrote:
Your linked IsBanned() code doesn't do anything that would cause a write. I don't actually see anything that would explain frequent writes.

If I could control this I would have long ago, but some internal process seems to be doing tons of checks here. No idea what though.
Bumping this after one of our headcoders pointed something out.

We can safely run on Linux now and the only thing that could have made a change would be this PR https://github.com/ParadiseSS13/Paradise/pull/20270 which removed the parent call on mob/Login(), which *could* do some stuff down the chain with ban.txt

No idea how stuff works under the hood but food for thought.