Page 1 of 1
Save Speed? Whats the actual limiting factor?
Posted: Fri Dec 02, 2016 1:45 pm
by DriVAnce
Yeah, Was wondering what the limiting factor for saving is?
System Specs:
Intel 6700K @ 4.4ghz
3200mhz 32GB DDR4
M2.Samsung Evo 960GB (Note, Was using a Normal SSD prior to upgrade, still had nearly identical save speeds)
2x Nvidia GTX 980, Probably only using one, havnt checked sli settintgs but they are active
Yeah, I am pretty much annoyed at the 2-3 seconds autosave time on a 30h+ hour map (thou not that big)
so was wondering what is the actual limiting factor? the CPU? or is the actually the RAM? since improving to a 4 times faster SSD isn't even help if not a tiny bit.....
Re: Save Speed? Whats the actual limiting factor?
Posted: Fri Dec 02, 2016 2:31 pm
by daniel34
viewtopic.php?f=6&t=34273#p214958
Rseding91 wrote:Currently the game state is copied out in one thread while another thread does the compression and writing to disk.When I implemented the threaded compression during saving for 0.13.0 I was testing with a 65 MB save file and it would save in 3.2 seconds. Of that 3.2 seconds 2.5~ worth was copying the memory around and the remaining 0.7~ was spent compressing and writing to disk.
Given the statement above I'd say its CPU+memory or bandwidth/latency between them that's mostly the limiting factor.
Re: Save Speed? Whats the actual limiting factor?
Posted: Fri Dec 02, 2016 3:46 pm
by DriVAnce
daniel34 wrote:viewtopic.php?f=6&t=34273#p214958
Rseding91 wrote:Currently the game state is copied out in one thread while another thread does the compression and writing to disk.When I implemented the threaded compression during saving for 0.13.0 I was testing with a 65 MB save file and it would save in 3.2 seconds. Of that 3.2 seconds 2.5~ worth was copying the memory around and the remaining 0.7~ was spent compressing and writing to disk.
Given the statement above I'd say its CPU+memory or bandwidth/latency between them that's mostly the limiting factor.
So it means that Harddrives (ssd's) are being bottlenecked by latency.... *ugh*
when did that happened last time? Wasn't it during mid 90s or late 90s?
Re: Save Speed? Whats the actual limiting factor?
Posted: Fri Dec 02, 2016 6:33 pm
by orzelek
DriVAnce wrote:daniel34 wrote:viewtopic.php?f=6&t=34273#p214958
Rseding91 wrote:Currently the game state is copied out in one thread while another thread does the compression and writing to disk.When I implemented the threaded compression during saving for 0.13.0 I was testing with a 65 MB save file and it would save in 3.2 seconds. Of that 3.2 seconds 2.5~ worth was copying the memory around and the remaining 0.7~ was spent compressing and writing to disk.
Given the statement above I'd say its CPU+memory or bandwidth/latency between them that's mostly the limiting factor.
So it means that Harddrives (ssd's) are being bottlenecked by latency.... *ugh*
when did that happened last time? Wasn't it during mid 90s or late 90s?
I think you misunderstood a bit - it's not the SSD thats bottlenecked. It's the CPU/memory bandwith and latency. It's the time to do in memory copy that takes more then compression and save to the disk.
Re: Save Speed? Whats the actual limiting factor?
Posted: Fri Dec 02, 2016 8:35 pm
by DriVAnce
You missunderstood my meaning.
What I meant SSD's are being Bottlenecked (Limited) By Latency, not latency in the harddrive itself but latency around it, like 2x GPU's being bottlenecked (Throtted, Limited for ya nerds) of a AMD CPU (I am talking about 5% if not less on 2x980)
SSD not being the bottleneck but being bottlenecked by others (latency, not speed Probably, since Memory is quite fast, but high latency)
Exact specs on Memory (Which I believe is the bottleneck, and to lower the save time by a second.... would probably cost more than my CPU per stick of 4GB) if there was that is
32GB DDR4 in Dual Channel mode (4x sticks of 8GB)
DRAM Freq: around 1640mhz (x2?)
FSB:DRAM: 1:24
CL: 16
tRCD: 18
tRP: 18
tRAS: 36
tRFC: 427
CR: 2T
Thou I believe the max bandwith is DDR-2132 (1066mhgz) since CPU-Z is saying that in SPD. I dunno tbh
CPU SPeeds:
Intel i7 6700K (Defualt 4Ghz)
Clocked to: 4.5ghz somewhat? (Busspeed: 102.5 MHz)
So I believe its the memory high latency that is my limiting factor for saving, but to get faster ram in terms of lat, would cost me more than my CPU per stick..... so I will have to stick with it with the 3-4s autosaves
Re: Save Speed? Whats the actual limiting factor?
Posted: Sat Dec 03, 2016 5:43 am
by bk5115545
Actually your memory is pretty fast and DDR4 has double the bandwidth of the more common DDR3.
The real latency is going to come from the number of pointer indirections that the game code has to do along with how the compression probably can't be parallelized. It's mostly about how the conceptual objects are referenced in memory (a limitation of the x86 architecture mostly mitigated by the branch prediction hardware).
There's no feasible workaround to pointer indirections.
From the little bit of code that's been posted through Fact Fridays, the codebase looks fairly clean. The best solution (ignoring memory budget) would probably to save another "state" of the game, much like the latency-hiding state, instead of saving the active state. This way the active state can continue on with it's life and the game doesn't have to be paused to save (maybe).
It's also not really that long it's just annoying because everything pauses. Try to compare it to other sandbox games (minecraft for example).
Edit: What's your motherboard? It's possible your M.2 drive is running at normal SSD speeds if the board doesn't provide a real PCI socket (some cheaper motherboards provide the socket but hook it up to the SATA bus which maxes at SSD speeds).
Re: Save Speed? Whats the actual limiting factor?
Posted: Mon Dec 05, 2016 2:23 am
by DriVAnce
A ASUS Z170 A, I will do a benchmark on the drive to see if I can get over 2k speeds
Update
weird....... slow speeds but windows wasn't even showing more than 30% speeds before 16K. so I dunno why its so slow
Edit Two:
Temps are at 65 or below, might need to install asus fan app so I can set the intake fans infront of the case a bit higher during load.... or go into bios and set that manually =/
Edit Three:
max temps reached: 67 Celsius (Operating temp seems to be at 70 max)
Edit Four:
AFter installing the NVME driver from their site(which i totally forgot existed)
still nowhere fast enough.... I dunno why...
Edit Five:
I did a facepalm, forgot to set bios to m.2 from sata express...
no speed changes besides 4K.... somehow that increased by a nice amount
Edit 6:
I give up hope....
I was unable to change that stupid setting to M.2.... it keeps reverting to SATA express, I checked that no drives are on the sata express port, I tried disbling the sata controller. and it keeps reverting.... getting gray hairs from this shit
Re: Save Speed? Whats the actual limiting factor?
Posted: Tue Dec 06, 2016 3:09 am
by bk5115545
DriVAnce wrote:I give up hope....
I LOL'd at this and everyone at work gave me a weird face.
Update your BIOS if it has an update. The M.2 firmware on the board may not support your model of device (happened to my Samsung 950 NVMe) so it's falling back to the previous working settings.
Also, your 4k will never be anywhere close to the optimal (threaded-sequential) simply because of the size of the data that is being read isn't even close to the size of the buffer that the device can handle.
Think of it like the device can do 4MB RW in bulk but you're only asking it for 4K. Of course it's slower to ask it for 1000 4K reads than it is for it to do 1 4MB read.
Here's the crystaldiskmark for my Samsung 950 PRO NVMe running as an NVMe drive. The drive IOPS are more important for the 4k stuff because that's really what it's testing.
And here's the Samsung Magic test which shows IOPS (my drive is running a little slower than reference but it's only like 5%).
Re: Save Speed? Whats the actual limiting factor?
Posted: Tue Dec 06, 2016 12:32 pm
by DriVAnce
About Bios.
Sadly its the latest firmware, I was unable to get it to M.2. Probably a M.2. non-storage device its meant for and not a SSD since videos I saw (one or two) had Sata express on ASUS
Well
I gotten the speeds up somewhat, but the problem is still IOPS
Also, The Speeds were affected by
1) Installing Samsung Magician
2) Which Version, Either 4.9.7 or 5.0 (4.9.7 is better but doesn't support my disk while 5.0 is useless but gives better speeds somehow?)
I don't know why Samsung Magician SOFTWARE affects speeds, when the driver itself is installed and should be the only thing the I installed (No Settings touched besides benchmark on Samsung Magician.
According to Some quick Googling for images, I saw only a few screenshots of Crystalmark of 960 Evo, and it seems I have way higher 4K than others but lower read & write..... (Does that even make sense?)
Currently running the CrystalMark once again for latest info
And yeah, according to specs, the Evo 960 which is cheaper than 950 Pro is faster somehow... thou 950 Pro came out quite long time ago compared to a disk that was just recently released. (Compared to my friends 950 Pro 500GB (all my speeds were waaaaaaaaaaaay faster somehow))
speaking of which....
here is the latest benchmarks
btw Can you believe that
---> THIS is pre-magician
---> THIS is AFTER-magician
oh yeah, I
rested reseted (not rested) my bios (load default) since the darn samsung magician 4.9.7 repoted PCIe x2 and not x4.... and that fixed it, so it got fixed somehow, i dunno what settings did that, I have forced most pci lanes to be maxed (supported), i guess forcing them is bad and leaving on auto is good.... at least for a 960 EVO.....