It will cause huge waste in that all fragments will now be blocked to 128k. Given that most objects are around 15k we can expect to use 8x more memory.
I think I'll just set the hardware sector size to min(8K, reported hw sector size) since Solaris is just lying anyway and it clearly doesn't cause the writes to fail. I'll change the error to a Warning, and we can add a reference to the documentation at some point. john On Fri, Mar 11, 2011 at 8:16 PM, Igor Brezac <i...@ypass.net> wrote: > On Fri, Mar 11, 2011 at 6:24 PM, Leif Hedstrom <zw...@apache.org> wrote: > > > > On 03/11/2011 09:42 AM, John Plevyak wrote: > >> > >> The largest hardware sector size that the cache supports is 8K. > >> > >> It seems that Solaris is highly configurable this way and can have a > >> 'hardware' > >> sector size up to 128k as a configuration option for the OS. > >> > >> Is this with the new Solaris patch? > >> > >> What sort of a storage.config and filesystem are you on? > > > > I'm using the default configurations ("make install"), and run the > regressions test (-R 1). This implies cache on file system, and my > filesystem is whatever the default zfs gives you during installation of > Solaris 11. I can give you more details, if I knew what to look for ;). It > does seem to work, it just gives me that error every time I start up or run > the regression test. > > > > John is correct. TS is complaining about the hw_sector_size being > greater than 8k. By default zfs file systems report 128k for > hw_sector_size even though it adjusts the block size internally based > on access patterns. My patch does not attempt to correct this issue, > it just allows the use of raw devices. > int sector_size = sd->hw_sector_size; > if (sector_size < cache_config_force_sector_size) > sector_size = cache_config_force_sector_size; > if (sd->hw_sector_size <= 0 || sector_size > STORE_BLOCK_SIZE) > Error("bad hardware sector size"); > > TS works just fine with this error, although per John there is > probably significant space waste. Users have a few options: > - Create a dedicated zfs file system for the cache file with 8k block > size. (zfs create -o recordsize=8192 <volume>) > - You can use my patch from TS-209 and use raw devices. (We've been > using it in production for a week now), Leif, can you apply my patch > to trunk? John reviewed it... > - For testing you can use /tmp/ 256MB in storage.config. /tmp/ is a > memory based file system that uses 4k block size. > > -igor >