1

I would claim that if I had a RAID-10 array which is used as swap device only, a chunk size of 4K would be perfect as it matches the page size.

Am I right?

1 Answers1

3

Such a low chunk size is way too small for striped/mirrored RAID arrays. The reason is that with such a small chunk size, even small sequential I/Os will engage both disks, leaving no bandwidth at all for other I/O requests.

Moreover, as for mechanical disks a 4K request 's service time is dominated by access time, rather than transfer rate, it is always better to exceed a little on the bigger side sizing striped chunks.

I strongly suggest you to use at least a 64K chunk size, if not more.

shodanshok
  • 44,038
  • 6
  • 98
  • 162
  • _"The reason is that with such a small chunk size, even small sequential I/Os will engage both disks"_ - Are you sure? As mentioned before it's the swap array, so every read / write request would be 4K. The RAID-10 contains 8 datacenter SSDs. – smartenbergen May 20 '17 at 17:43
  • 1
    True, a single swapped page is 4K in size. But multiple sequential swapped page can (and will) be coalesced in a single bigger write. For SSDs a small chunk size is somewhat more tolerable, but even in this case a single bigger write will be beneficial. – shodanshok May 20 '17 at 18:00