AHK and drive safety when constantly writing to disk

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
Mika_erdo
Posts: 41
Joined: 30 Jul 2020, 17:23

AHK and drive safety when constantly writing to disk

07 May 2022, 05:16

First of all am fairly new to all this, so please bear with me.

I am in situation where I need to constantly write the contents of a variable to an INI file located on the C: drive. By constant I mean anything from 1 Second to 200ms.
- How safe would this be for the drives health?
- Would it speed up its deteriation considerable more?
- Between SSD and tradional Hardrives, which type are known to be optimal for programs that need to constanly write small files and also reading on demand?

I did some reading, for example this thread here Why you shouldnt use FileAppend to continuously write to the disk - AutoHotkey Community discourages this kind of thing

Any help would be greatly appreciated!
User avatar
mikeyww
Posts: 27214
Joined: 09 Sep 2014, 18:38

Re: AHK and drive safety when constantly writing to disk

07 May 2022, 05:52

I will provide my simplistic view. First, I assume that you have two programs that need to access the same INI file, and this is why you have asked the question. Disks always generate wear when accessed (whether to storage medium or other parts), but the wear per access is very small. Modern disks can handle a lot of accesses, typically for many years of common use if it's a good disk. You can read about that online, specifically regarding how many accesses a disk can handle for reading & writing, by disk type. Windows itself is accessing its system disk almost constantly, so that is probably the best evidence that common uses of disks typically generate no real concern. SSD is faster because it has no mechanical moving parts (& probably additional reasons of random access). It might last longer, too, but mileage may vary by brand & usage. Unless you are running a shared server, these days, an operating system is often likely to become obsolete before the disk crashes. Use SSD if you can afford it. That said, my desktop computer has 3 SSDs and 6 hard disks that have been running for a long time. I use the hard disks for archives and other things that I do not access much. Like a car: hmm, if I stop driving it, maybe it will last longer.... :)

A disk can sometimes be set to write immediately or use a cache. The best setting depends on the need.
scriptor2016
Posts: 864
Joined: 21 Dec 2015, 02:34

Re: AHK and drive safety when constantly writing to disk

07 May 2022, 13:38

My main Windows drive is an old Hitachi Deskstar which I swear must be 20 years old by now - and never a problem. It's still running Windows just fine up to this day unbelievably.

Yet I've owned several Seagates over the years and many of them failed within the first year. Trying to stay away from them now. WD has been fine for me as well.
User avatar
mikeyww
Posts: 27214
Joined: 09 Sep 2014, 18:38

Re: AHK and drive safety when constantly writing to disk

07 May 2022, 14:14

I agree-- Hitachi & WD pretty good. I had some bad Seagates, too, but varies. One "poor man's" approach to predict is the warranty; WD Black has 5 years on it, been great for me so far.

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: AlFlo and 114 guests