Configurable save locations

jdphenix

Active Member
Mar 26, 2017
26
3
32
Looking at the core code for handling serialization of world state, all the save locations are hard coded in the `/Saves` folder on the root of the install path.

It works, and nothing's wrong with it, but what do we think of being able to have your saves elsewhere. Maybe for performance considerations having the index files on one disk and the types and binary data on another disk?

I could probably implement this. As far as I can tell, it would require handling of save locations in backups, save, and load implementations.
 

Keninishna

Active Member
Sep 12, 2015
37
11
You could probably do this pretty easily although I figure it would be easier to just stick the whole servuo folder on the fastest drive as it doesn't take up much space to begin with. Putting the index files on another disk won't help much because I believe the index just holds constructor types and not an actual index of of the binary file.
 

ppardalj

Active Member
May 23, 2015
33
4
30
Logroño, Spain
www.linkedin.com
Maybe not another disk, but what if you put the saves on shared memory (/dev/shm)? There may be a huge improvement in load/save times by reading/writing directly to memory... maybe you could do the experiment and share the results with us :)
 

jdphenix

Active Member
Mar 26, 2017
26
3
32
Maybe not another disk, but what if you put the saves on shared memory (/dev/shm)? There may be a huge improvement in load/save times by reading/writing directly to memory... maybe you could do the experiment and share the results with us :)
A common strategy in management of SQL Server files is to have the log and database on two disks to avoid contention on bandwidth. My thought was the same.

A RAM cache is interesting, and if I do that would prefer to write it in a portable manner, so I'd need to research that. I'd also be concerned about durability (in the ACID sense), but it could be worth experimenting with. If it improved speed enough, perhaps it would be possible to save every 1 or 2 minutes.
 

Keninishna

Active Member
Sep 12, 2015
37
11
Maybe not another disk, but what if you put the saves on shared memory (/dev/shm)? There may be a huge improvement in load/save times by reading/writing directly to memory... maybe you could do the experiment and share the results with us :)
Ramdisk could be faster. It would be better to just use code to buffer the save in memory instead using multithreading. I have tried this on my server and saves are 10x faster from what I can tell. You can check it out at 192.151.158.220.