Any means of additional layers is often considered an “overhead” that decreases performance. We all heard the statements that database should be physical and so on… So let’s put the medal to the metal and do a very quick & dirty performance test!
We’ll be using the most basic “dd” command as test bed. Just to measure the throughput and time. We won’t measure anything else…
dd if=/dev/zero of=/root/testfile bs=512 count=1000 oflag=direct
dd if=/dev/zero of=/root/testfile bs=1G count=1 oflag=direct
Where the peak is confirmed by our monitoring system ;
For me the result between the first & the second test show a caching effect. So we should consider the first as “raw” where there is a difference. Anyhow, after that the performance seems (give or take) the same.
Anyhow, the biggest lesson here is ; always measure / test / validate your deployments. You should know exactly how they will perform under stress!
After the initial testing, I also did a quick test with a mapped volume. To see if the overlay structure had an impact ;
- Container : 11,6MB/s
- Host : 11,5MB/s
Before your freak out… The mapped drive was a network share and not the same (ssd) disk as in the previous test. For me the, overlay does not seem to have a negative effect.