Measure HDD read and write speed with dd
A single command is enough to know this, the command is as follows:
dd if=/dev/zero of=test bs=64k count=16k conv=fdatasync
Basically what it will do is create and write randoms data to a file (called test), the final weight will be 1024MB, that is, 1GB, and what it will tell us (and what really matters to us) will be the speed with which it fills those 1024MB and the time it took.
Here is a screenshot of a terminal after executing the command:
As you can see, it took 9 seconds to fill that GB, which means that the speed was 119 MB / s ... not bad 😉
How do I know if my HDD is slow?
To know if your hard drive is slow you just have to know that basically any speed greater than 50 MB / s is acceptable (I repeat, acceptable, not super fast). In case your hard drive does not measure up or you want a faster one or SSD, I recommend that you look in specialized stores where they will advise you when it comes to buy hard drives and asking, they will recommend the hard drive that you really need based on your budget or needs. In my case my desktop PC with a normal HDD gave me 70 MB / s. Of course, if it is an SSD or a RAID and the "acceptable" speed is not the same ????
If you need a hard drive for a server it will always be better to use an SSD, unless it is clear that the server needs a lot of storage capacity so either you have a slower HDD with a lot of capacity or you make an investment buying SSD hard drives and creating a raid.
Basically this is it, I hope it has been useful to you.