1

Purely in terms of drive life which will be better for hashing hundreds of thousands of files - SSD or HDD?

Background - My HDD has files which I want to hash and compare with data in a spreadsheet, but I feel hashing so many will kill the drive and I can't afford to lose it. If I copy everything to an SSD will there be less chance that reading so much data will affect the SSD's life compared to the HDD's?

1
  • 2
    Hashing a file usually involves copying it into memory, then performing work on it. Likewise, copying a file usually involves copying it into memory, then placing it somewhere else on the disk. Point being, if you are comparing simply hashing the files in-place or copying them to an SSD first, you're putting the same amount of "wear" on the HDD, regardless of what option you choose. It would probably be faster if you just hashed them in place, saving the time of copying them to the SSD first. May 8, 2015 at 1:23

3 Answers 3

3

SSD and nand chip life is reduced by the writing to it, not the reading of it.
Hashing files stored on the SSD will be reading them, even hashing it over and over again would be reading them, so a SSD would be very good for that type of operation. Even with writing, you would have to write massive quantities before that would be a real issue in modern SSD drive.
The quality of the drive itself could be just as important as how it was treated. A SSD would be much faster for the operation, depending on other factors, like CPU speed, Bus speed for communicating to the drives, and even the efficiency and optimisation of the program doing the hashing.

You did not cover in your question if you will be copying the files to the drive, or repeatedly copying files to there to just do the hash, then remove them again. That (of course) would not be the same.

A Hard disk could just as easily do this task for years, and writing to it over and over again, makes little difference, the hard drive would be much slower for the disk reads and writes.

Either one of them or any operations your doing that involve storage , would still benefit from having a proper backup of the data, preferably disconnected from the computer after created, where it can sit safely if anything (soft or hard) would go wrong with either the SSD or a HD.

0

It won't make a difference. SSDs might be faster, but if the bus it's connected on is slow, it won't make a difference. With 2 PCs I have, reading from internal SATA SSDs barely doubled read-performance under optimal conditions. With 2 other PCs (laptops) it made no difference. Also, SSDs have a limited number of writes they can make, but generally speaking, this is not a real issue unless you are constantly re-writing those files.

The HDD is spinning whether or not it's reading and writing -- unless the PC puts it to sleep -- and today's drives are unlikely to fail unless they get severely jostled around (as on a laptop) or have water thrown on them. HDD recovery experts say that most of the time (>60%) the failure is in the electronics, not the physical mechanics. Essentially the controller overheats and dies. The same could happen to SSDs but there is less heat, and therefore possibly fewer burn-outs. But remember: SSDs don't have the track-record HDDs have so who knows.

So: buy a second drive, take backups.

-1

Hashing files is primarily a CPU based operation, so that will be the bottleneck. Purely from a harddrive point of view, SSD will allow for the files being read a lot faster, but I doubt this will be noticable compared to the hashing itself. (Depends on what hashing algorithm you're using, but still, reading the file is a lot faster than hashing it in 99% of the cases).

As you're just comparing the hash, I am presuming that you're not saving it, so the harddrive operations will only be reads, in which case it shouldn't wear out an SSD drive anyway.

Edit: As Karan pointed out, a mechanical drive will actually wear out more, as its moving parts work just as much during reads as writes.

To sum it up: SSD is better and safe for you, but probably won't matter purely from a speed point of view.

2
  • 2
    Since it will be reads in both cases, you should specifically address how the HDD and SSD will compare in that sense (as in mechanical drive will wear out more and so on).
    – Karan
    May 7, 2015 at 21:52
  • 2
    A typical hard drive can read 100MB per second or less. A typical SSD can read 500MB per second or so. A typical modern CPU can perform even a high-end, cryptographically-secure hash (SHA512) on over 1GB per second. For hashes that aren't cryptographically-secure, it's more like 4GB per second. Your answer makes no sense. May 7, 2015 at 22:27

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .