You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@trafficserver.apache.org by Leif Hedstrom <zw...@apache.org> on 2011/03/09 03:45:54 UTC

Solaris cache warning / error

I'm getting this on my Solaris VM, running current trunk:

Mar  8 19:44:41 solaris11 traffic_server[26419]: [ID 702911 
daemon.error] {1} ERROR: bad hardware sector size


Does anyone else (using Solaris) see this too? This is using a cache on 
the file system.

-- leif


Re: Solaris cache warning / error

Posted by Igor Brezac <ig...@ypass.net>.
On Sat, Mar 12, 2011 at 2:01 PM, John Plevyak <jp...@acm.org> wrote:
>
> 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.

That'd be fine.

-igor

Re: Solaris cache warning / error

Posted by John Plevyak <jp...@acm.org>.
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 <ig...@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
>

Re: Solaris cache warning / error

Posted by Igor Brezac <ig...@ypass.net>.
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

Re: Solaris cache warning / error

Posted by Leif Hedstrom <zw...@apache.org>.
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.

Cheers,

-- Leif


Re: Solaris cache warning / error

Posted by John Plevyak <jp...@acm.org>.
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?

john

On Tue, Mar 8, 2011 at 6:45 PM, Leif Hedstrom <zw...@apache.org> wrote:

> I'm getting this on my Solaris VM, running current trunk:
>
> Mar  8 19:44:41 solaris11 traffic_server[26419]: [ID 702911 daemon.error]
> {1} ERROR: bad hardware sector size
>
>
> Does anyone else (using Solaris) see this too? This is using a cache on the
> file system.
>
> -- leif
>
>