[tz] Looking for a way to cut down binary zoneinfo size. Does anyone have the way to?
Paul.Koning at dell.com
Paul.Koning at dell.com
Thu May 18 17:39:39 UTC 2017
> On May 18, 2017, at 1:29 PM, Arthur David Olson <arthurdavidolson at gmail.com> wrote:
>
> Cutting out old data may not buy as much as you'd like. Putting a "timecnt = 0" at the top of "writezone" in "zic.c" and then comparing the produced directories of the original ("tzraw") and modified ("tzcooked") yields:
>
> Script started on Thu, May 18, 2017 1:12:37 PM
> $ du -s tzraw/tmp/etc tzcooked/tmp/etc
> 3103 tzraw/tmp/etc
> 2356 tzcooked/tmp/etc
> $ exit
> exit
> Script done on Thu, May 18, 2017 1:12:49 PM
>
> Limited savings is due to disk sector size; as an example, the "America/New_York" produced by an unmodified zic weighs in at 3545 bytes; on a 4096-byte-sector system, the one sector it takes can't be reduced.
>
> (Your correspondent is enough of a fossil to have lived in the age of 512-byte sectors.)
>
> If space is at a premium, be sure to "make REDO=posix_only ..." when building.
>
> @dashdashado
That's a point. Note though that removing old information will also make for a bunch of duplicates, which reduces the total storage needed. Also, if you can use a storage system that packs the data, the sector issue may not be there. I could imagine, for example, storing the zone data in a zip file and extracting the desired file when the user says "I want to use zone America/Thule". In our own case, I used a dense file system similar to Linux's "romfs".
paul
More information about the tz
mailing list