From 80e5e0409429f33a4ebeaa00016c3dc8cc7e4f8f Mon Sep 17 00:00:00 2001 From: Crystal Qian Date: Thu, 11 Jun 2015 11:12:00 -0600 Subject: [PATCH] TS-436 Added documentation for hardware sector size support --- doc/reference/configuration/records.config.en.rst | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/doc/reference/configuration/records.config.en.rst b/doc/reference/configuration/records.config.en.rst index 694d338ae9f..3b630ecb802 100644 --- a/doc/reference/configuration/records.config.en.rst +++ b/doc/reference/configuration/records.config.en.rst @@ -1234,10 +1234,20 @@ Cache Control usable. See :ref:`Reducing Origin Server Requests `. -.. ts:cv:: CONFIG proxy.config.cache.force_sector_size INT 0 +.. ts:cv:: CONFIG proxy.config.cache.force_sector_size INT 4096 :reloadable: - Forces the use of a specific hardware sector size (512 - 8192 bytes). + Forces the use of a specific hardware sector size, 4096, for all disks. + + SSDs and "advanced format” drives claim a sector size of 512; however, it is safe to force a higher size than the hardware supports natively as we count atomicity in 512 byte increments. + + 4096-sized drives formatted for Windows will have partitions aligned on 63 512-byte sector boundaries, so they will be unaligned. There are workarounds, but you need to do some research on your particular drive. Some drives have a one-time option to switch the partition boundary, while others might require reformatting or repartitioning. + + To be safe in Linux, you could just use the entire drive: ``/dev/sdb`` instead of ``/dev/sdb1`` and Traffic Server will do the right thing. Misaligned partitions on Linux are auto-detected. + + For example: If ``/sys/block/sda/sda1/alignment_offset`` is non-zero, ATS will offset reads/writes to that disk by that alignment. If Linux knows about any existing partition misalignments, ATS will compensate. + + Partitions formatted to support hardware sector size of more than 512 (e.g. 4096) will result in all objects stored in the cache to be integral multiples of 4096 bytes, which will result in some waste for small files. .. ts:cv:: CONFIG proxy.config.http.cache.http INT 1 :reloadable: