yes, so:

4k is the RAID0 stripe size. And it is the unit of memory linux uses for paging. So I assume linux swap is a filesystem that uses 4k blocks, or is optimized for reads and write of 4k anyway. Data will always be written in 4k chunks, the same size as a stripe on the RAID0.

since it's a RAID0, there is the possibility that the RAID controller can allocate reads to some devices and writes to others in an optimal way. Surely that's a major part of what a RAID controller or algorithm does.

and that's part of the reason for using many small SSD's each with a read xor write of about 200MB/s. The other reason obviously is maximise the sum of the read xor write bandwidths.

If the RAID card can read and write simultaneously at 8x, and intelligently allocate reads and writes to different component SSD's of the RAID0 set, then that's 4x in each direction, which is a total of 4GB/s. So, that would mean 20 SSDs attached to the card, half of which would be reading and half writing at any one time in an optimal situation of simultaneous 4x read and 4x write over 8x link.

assuming the RAID controller can figure out to write to different devices in the RAID0 set than it is reading to.

And I'd have thought it would be good at that.

But I don't know what algorimths RAID0 controllers and software use.

in addition: I have not one, but two PCIe busses. And I propose to put a RAID card, and 20SSD's on each (totaling the 2TB).

The linux kernel can treat these two RAID0 volumes, formatted as swap, as a single swap space. but it knows they are different partitions, on different devices.

So the kernel may help, or be compiled with suitable options to help, by writing to one device and reading from the other in the most optimal way.

there will inevitably be times when data to be read is on a SSD that is being written to.

but not too many, because the flow of memory reads and writes in our code falls into a pattern where large areas are for reading at time t or writing at time t but not both.

linux's paging activity will reflect that. so the pattern of reads and writes should fall into a neatish pattern of address distribution across the RAID set when it's used as a page cache (virtual memory).

So: the points at issue are:

can raid controllers intelligently decide what device to write to and what to read from during simultaneous reading/writing? Surely a big database server would pretty much require that from it's RAID set?

the main question is whether there are RAID0 controllers that can take 20 SSD's, read (never mind read/write at same time) data from them simulteaneously @ 200MB/s each in 4k chunks and send 80K of data @ pciex8 speed.