[haiku-development] Re: hpkgs and compression

  • From: Jonathan Schleifer <js-haiku-development@xxxxxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Sat, 22 Mar 2014 18:23:56 +0100

Am 20.03.2014 um 23:11 schrieb Ingo Weinhold <ingo_weinhold@xxxxxx>:

> First of all what blocks are you talking about? FS blocks? The block size of 
> the target FS is not known when the package is created. Page alignment would 
> be natural as that's the file caches unit as well, for packages containing 
> lots of small files it does waste quite a bit of memory, though.

Good point. I was talking about hard disk blocks here, which are mostly 4K with 
modern devices. They at least are for modern HDs and for SSDs.

> Anyway, have you done any benchmarks that support your alignment theory? Due 
> to caching it is usually not detrimental to read two pages when you need only 
> one at one point, since you'll likely need the other page later anyway.

Hm, you might be right that in real world usage you often need the second block 
you unnecessarily read before a little bit later. The whole things gets 
pointless with read ahead anyway.

> If the data is compressed, the compressed units need to be even larger to 
> allow for a reasonable compression ratio. I doubt that aligning the data is 
> particularly helpful in this situation. In fact it would only reduce data 
> density and thus the compression ratio (a chunky format is needed for fast 
> random access).

Yes, you might be right about the alignment part not making that much of a 
difference. Especially as I think BFS does not align to 4K blocks of modern 
hardware anyway.

--
Jonathan

Other related posts: