Page 1 of 1

slow world saves

Posted: Wed Mar 07, 2007 7:12 am
by dragon slayer
wow no items no npcs just me loged in and i did a save it complety froze me for 9 seconds wow thatsa record with a blank wordlfile.

Posted: Wed Mar 07, 2007 9:47 am
by Xuri
Interesting. With a clean world, my UOX3 saves in 0.02 seconds.

Posted: Thu Mar 08, 2007 5:30 am
by dragon slayer
yeah it is weird does that every time I'm running it on this machine

windows xp pro
3.2 intel celron
512 ram
80ghd
256 mg radeon x1300 pci graphic
sound blaster live 24bit

only services running in background are the ones needed to run my graphics and windows and soundblaster
nothing more or less

cpu spikes no more then 2% on my pc but when uox3 saves cpu spikes at 100% and freezes for 9 seconds on save

does it hate intel LOL

Posted: Thu Mar 08, 2007 7:38 am
by stranf
wow!

9 seconds and .02 seconds?

That's amazing! I'll trade ya!

Mine is like 28 seconds on my Satar Hard Drive Equiped PC. But then again, my wordfile is now around 40MB....dang custom houses you can't freeze!

As far as I can, worldsaving and worldloading is affected more by your harddrive speed as opposed to available RAM and CPU. All you are doing is reading ASCII text and parsing it (as far as I understand), which is a simple feat for most modern computers. The bottleneck is your hard-drive access speed.

As I'm watching my Grandpa's computer load the worldfile right now my PC hasn't jumped higher than 50%, and is only using 200MB of RAM (most is base Windows XP stuff). It just jumped to 305MB when I hit 50%....UOx3 must dump stuff in ram once you hit 50%.
Then it jumped up to 350MB after 100%.

Total Load Time: 136.83s.

On a Duo Core PC with the Satar Hard Drive the world Load Time clocks in at around 120 flat. But in "real life" time it is about 45s to 1min quicker when you count in the time it takes to load the DFNs and JS scripts.

I believe when we compared my Satar system to a conventional hard-drive system, the Satar was up to about 8-12% on the world save before the other computer even started.

I wish we could speed these up, although I'm not sure if it is possible without re-writing the world files. I've had to disable the auto-save timer, as autosaves take nearly 30seconds....an eternity to most players if it happens at inopprotune times. Now we just let the GMs control worldsaves, and it has gone much smoother.

Posted: Thu Mar 08, 2007 2:28 pm
by Grimson
Are you using a background virus scanner? If yes, that might slow disk writes (and so the worldsaves) quite a bit down.

As for improving worldsaves I was thinking about some different ways to enhance and speed them up. But the best way I have, so far, come up with would require a switch to a MySQL based database. Using just-in-time saves for data that doesn't change often (like most item and char attributes), and periodical saves for data that changes constantly (like char locations, hitpoints and so on).
That would be a major rewrite of the codebase, and the person running the server will need good knowledge in setting up and configuring MySQL, as the whole server performance stands and falls with the performance of the database.

Posted: Thu Mar 08, 2007 3:44 pm
by Maarc
I've had thoughts on such things as well, and some might be still floating around on the forums. A DB transition is a hard one though ... so many questions are there, and how do you answer them that will fit with everyone? Level of SQL, is it a fixed vendor, do you go for referential integrity, what about transactions, etc etc. And would it necessarily be faster? How much do you keep in memory, how much do you fetch from a DB? You could come up with a list of questions a mile long :)

Your other bet would be to try and reduce the number of actual IO transactions. It looks like it's a couple per object (down from one per line per object like it used to be!). If you could find a way to batch them all, or into bigger pages, it'd go a long way, because IO is such a killer. Perhaps a memory file of some sort, batch them into groups of 100 or so.

Posted: Thu Mar 08, 2007 4:34 pm
by Xuri
Maarc: Whatever happened to the plan of only saving what UOX3 had marked as "changed" or whatever? Wasn't that part of the reason why the single file was split into multiple, and the REGIONS stuff inside the files and whatnot? =P

Posted: Thu Mar 08, 2007 5:42 pm
by dragon slayer
like i said nothing else is running just windows xp desktop servics i don't even have my firewalls on everything was turned off to turn it into a server pc.

Posted: Fri Mar 09, 2007 3:11 am
by giwo
Binary saves would certainly be faster, just a bit of work to get it plotted out originally so we can read everything in back accurately.

As for the "saving only what changes", that whole concept scares me, honestly. I can picture in my head how we would accomplish it, but it just screams worldfile corruption to me.

Posted: Fri Mar 09, 2007 10:45 am
by Maarc
You'd really have to get it right if you wanted to save the dirty stuff.

But as far as binary saves go, I gave up, pretty much. The moment people put in arbitrary tags through JS became the moment that it wasn't really worth pursuing. You'd have to seperate into two stores then. The fixed store, and the variable store. All the fixed stuff (ie non-JS tags) could be written quick and clean in a binary fashion, because it's fixed. The variable might still be writeable in a binary fashion, but it would be best dropped into it's own separate file. Because with an object, you really want a fixed size record where possible. Makes it MUCH easier, and much faster.

Re: slow world saves

Posted: Wed Jul 28, 2021 11:55 pm
by dragon slayer
This can be closed out as it was a computer problem and not UOX3 back in the day when we had old pcs