If I read bytes from a file into a byte[] I see that FileInputStream performance worse when the array is around 1 MB compared to 128 KB. On the 2 workstations I have tested
This can be because of cpu cache,
cpu has its own cache memory and there is some fix size for that you can check your cpu cache size by executing this command on cmd
wmic cpu get L2CacheSize
suppose you have 256k as cpu cache size, So what happens is If you read 256k chunks or smaller, the content that was written to the buffer is still in the CPU cache when the read accesses it. If you have chunks greater of 256k then the last 256k that were read are in the CPU cache, so when the read starts from the beginning the content must be retrieved from main memory.