I have a question which is slightly programming related, but it mostly relates to how ext4 works.
I have a program which writes 128MB to a file with changing random aligned offsets. I write 256KB every write call. Now the speed results are significantly different between the two devices.
/dev/sdb both ext4, while sda is 8GB, sdb is 512MB.
For example, a write task on
/dev/sda took 0.7 seconds to complete, while the same write took 0.05 seconds to complete on
/dev/sdb. Both partitions are on the same hard disk, which is not an SSD.
EDIT: Sorry I forgot to add that this is running on a virtual machine with VirtualBox with the host being a Windows system. Its definitely only one physical drive because my laptop only has one.
EDIT2: I've found the issue, I was running the program on what I thought to be '/dev/sda' but it was a shared folder the I mounted from the host system. I didn't realize the filesystem will be different.
I'm interested to know what behind of scenes stuff could cause such a dramatic change in performance, thanks!