GrandOrgue / grandorgue

GrandOrgue software
Other
175 stars 43 forks source link

Use wavpack for cache compression. #2029

Closed rhpvorderman closed 1 month ago

rhpvorderman commented 1 month ago

A couple of observations:

I think GrandOrgue would benefit from GoSoundingPipe's saving and loading cache actions always going through wavpack.

Given wavpack's tremendous speed, I doubt it will be a bottleneck.

Is this a feasible idea?

rhpvorderman commented 1 month ago

After compressing all friesach data with wavpack's default settings the files are 5,5 GB. So that must mean this is probably implemented. Otherwise the cache could never be 12 GB as the uncompressed data is 17 GB. Oh well.

oleg68 commented 1 month ago
  1. The cache was designed for speeding up loading from spinning HDDs, not SSDs.
  2. Loading from the cache utilises only one cpu thread while loading from original samples can utilise more cpus. Reading several sample files in parallel may increase loading the organ. So I recommend you to disable cache.
  3. If the Pcie 2.0 throughput is your bottleneck, you may try to compress the samples with vawepack as for the .orgue files. GrandOrgue supports using .wv files as well as .wav files.
bonninr commented 1 month ago

I'll chime in to ask about a wavPack feature: lossy compression. Is the saving or loading from lossy samples supported? Thanks!

rhpvorderman commented 1 month ago

Thanks @oleg68 . I did a few tests:

The cache is therefore also very beneficial in my SSD scenario. My system has a i5-2500S (four cores, no hyperthreading), so the cpu is not that great. Still I feel on more modern platforms the cache will also be faster than loading if fast PCIe 4.0 SSDs are used.

I will close this issue as the cache already uses wavpack compression. GrandOrgue is so extremely well build and optimised. Thank you so much for building and maintaining it!

oleg68 commented 4 weeks ago

@rhpvorderman There are more options to try:

rhpvorderman commented 4 weeks ago

So in my case loading from the cache, which does not require any CPU load is the fastest. I am storage bottlenecked in that case, but I managed to wiggle a PCIe nvme SSD in the system (thanks to a mxm to pcie converter card) and now the organ loads in 15 seconds. I am quite happy with that!