Dan(Tasanar)

Moderator
So slowly my world save times have increased over time. I 100% understand this is due to players, items, ect.

Now what I want to know is, is there a way to see exactly what impacts a shard save? I ask because when I started my saves were 0.1 - 0.2. Slowly this has grown to .5 - .6.

After I added todays recent svn it jumped to 1.0 a save. I know .4 is not much but since it took two years to hit .6 and now it is it 1.0 in a day what could possibly impact that?
 
@XeroX

If you use your new "debug" compiler it increases my shard saves by 50%.

If I use the normal compiler it does not.

What benefit does your debug mode have over the old -debug ? I used to always run my shard in debug just to be able to pinpoint crashes for the team here.
 
Hello,
there is no "new" -debug, its the same, nothing changed in the behavior. -debug can be used with all versions.

Normal compiler = Compile.WIN - Release.bat ?

Only thing changed is the removal of /optimize when Debug is used to align compile behavior/options with visual studio, so outcome of VS Debug is the same as with CSC Debug.

However lets investigate this...

EDIT: Forgot to mention that -debug is completely unrelated to "compiling" with debug.
[doublepost=1518511161][/doublepost]Hello,
I can reproduce this,

So to cleanup with confusion:

-debug triggers the "debug" variable in Server (and Scripts) setting it to true. If scripts/server have exented output they will do this no matter how you compile.

Compiling with Debug adds overhead allowing you to debug the server while running. You can attach Visual Studio or IDA or whatever and debug it on runtime seeing the actual code, with the additional compiled PDB File (which is only added in Debug Builds)

In the past Visual Studio Projectfiles where configured using Debug as intended. The BAT File uses Debug BUT addtionally uses optimize. Optimize will render using Debug (which adds overhead anyways) partly useless. So using optimize in combination with debug...you're better-off using release.

Conclusion:
Stick with Compile.WIN - Release.bat for production use (as mentioned in the readme), you can add -debug for extended output of scripts and server. Compile.WIN - Debug.bat is really for development as stated in the readme. You can attach a debugger what isn't or partly possible with Release builds.

"When the compiler optimizes code, it repositions and reorganizes instructions. This results in more efficient compiled code. Because of this rearrangement, the debugger cannot always identify the source code that corresponds to a set of instructions."
Source: https://technet.microsoft.com/library/606cbtzs(v=vs.120).aspx

So right now we can better track error and performance regressions because it doesn't matter if you compile it with VS or CSC anymore as options now lineup. This hasn't been the case before. Release or Debug can be tracked in the first output of servuo.

PAST:
Visual Studio:
Release -> release, optimize (no overhead)
Debug -> debug

Compile.bat:
Release -> not available
Debug -> debug, optimize

NOW:
Visual Studio:
Release -> release, optimize (no overhead)
Debug -> debug

Compile.bat:
Visual Studio:
Release -> release, optimize (no overhead)
Debug -> debug

EDIT: My Worldsave timings:

release: 0.2-0.3
debug with optimize: 0.3-0.4
debug: 0.5-0.6

EDIT: ScriptCompiler.cs

Even here https://github.com/ServUO/ServUO/blob/master/Server/ScriptCompiler.cs it only adds /optimize if not in -debug mode. So this was all mixed up.
 

Attachments

  • Capture.PNG
    Capture.PNG
    18.6 KB · Views: 8
Last edited:
Honestly, one of the best ways to clean up is to delete old and inactive accounts. But that isn't something we generally want to do as it discourages the possibility of returning players. On the flip side though, it would encourage players TO play more often so they're not worried about their account getting deleted
 
Not to necro this thread. But no one seems to have answered the question. What does actually have the most impact on save times?
I can see save times vary between 1sec to 11seconds sometimes. Not much rhyme or reason beyond "just cause" I am assuming the longer save times have to do with active spawns and events going on though.
 
Back