1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

World Save Times

Discussion in 'ServUO Discussion' started by Tasanar, Feb 12, 2018.

  1. Tasanar
    Offline

    Moderator

    Joined:
    Oct 16, 2014
    Messages:
    4,332
    Likes Received:
    94
    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?
     
  2. Tasanar
    Offline

    Moderator

    Joined:
    Oct 16, 2014
    Messages:
    4,332
    Likes Received:
    94
    @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.
     
  3. XeroX
    Offline

    XeroX Member

    Joined:
    Jun 8, 2016
    Messages:
    125
    Likes Received:
    7
    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.
    --- Double Post Merged, Feb 13, 2018 ---
    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.
     

    Attached Files:

    #3 XeroX, Feb 13, 2018
    Last edited: Feb 13, 2018
  4. Tasanar
    Offline

    Moderator

    Joined:
    Oct 16, 2014
    Messages:
    4,332
    Likes Received:
    94
    Thank you. Now that I had actual time to sit and read it, it makes sense.
     
  5. zerodowned
    Offline

    Moderator ServUO Developer

    Joined:
    Jun 28, 2014
    Messages:
    1,720
    Likes Received:
    196
    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
     
  6. XeroX
    Offline

    XeroX Member

    Joined:
    Jun 8, 2016
    Messages:
    125
    Likes Received:
    7
    @zerodowned

    Wrong thread? I don't get the context.
     
  7. zerodowned
    Offline

    Moderator ServUO Developer

    Joined:
    Jun 28, 2014
    Messages:
    1,720
    Likes Received:
    196
     
    • Thanks! Thanks! x 1
  8. sahisahi
    Offline

    sahisahi Member

    Joined:
    Jan 13, 2016
    Messages:
    643
    Likes Received:
    18
    Item count have a huge impact on save times if im not wrong
     
Similar Threads: World Save
Forum Title Date
ServUO Discussion Weird error on world Save - Is this something to worry about? Jul 17, 2018
ServUO Discussion World-Save-Errors Word document created for my shard? Apr 9, 2018
Archived Bug Reports world-save-errors Mar 9, 2017
Archived Bug Reports High CPU and Drive Usage After World Save Sep 22, 2016
Windows Support World Save Error May 24, 2016
Archived Bug Reports World save causes Autocraft to halt Apr 13, 2016
Windows Support Slice() or XmlSpawner causing world Save warnings. Jan 19, 2015