[squid-users] KB vs KiB

Francesco Chemolli gkinkie at gmail.com
Thu Dec 7 22:21:29 UTC 2017



> On Dec 7, 2017, at 22:14, Alex Rousskov <rousskov at measurement-factory.com> wrote:
> 
> On 12/07/2017 12:12 PM, Ing. Pedro Pablo Delgado Martell wrote:
>> I have been reading about the difference between a KB and a KiB,
>> Kilobyte and Kibibyte respectively. According to several websites, also
>> Google,  1KB = 1000 bytes and 1KiB = 1024 bytes. However, you guys say
>> on /etc/squid/squid.conf this:
>> 
>> "Units accepted by Squid are:
>> 
>>         bytes - byte
>> 
>>         KB - Kilobyte (*1024 bytes*)
>> "
>> 
>> This email is not for criticize your work, I'm only looking for some
>> clearance because right now I'm confused about how Squid is really
>> measuring files.
> The statement in squid.conf.documented is accurate: When parsing
> size-related options that support units, Squid interprets the KB suffix
> as 1024 bytes. This classic/legacy interpretation predates and violates
> some of the modern conventions/standards. I do not anticipate changes in
> this area because it is not trivial to make such changes
> backwards-compatible, and because we should solve much bigger problems
> first.
> 
> Please note that Squid may use a different KB definition in other
> contexts, especially in various reports and cache.log messages.


I’d add that patches or pull requests aiming to add uniformity to how these values are interpreted and printed are welcome; in this case however backwards compatibility should be guaranteed: this change doesn’t in my opinion meet the standard required for changing the behavior of deployed configurations.

	Francesco


More information about the squid-users mailing list