Bug nella versione 2004 di Windows 10 riduce la vita degli SSD

E’ stato scoperto un nuovo bug scoperto in Windows 10 2004 che comporta la segnalazione della necessità di deframmentare l’hard disk anche quando sul computer c’è un disco SSD e il tentativo di eseguire il TRIM di dischi non-SSD.

Con l’aggiornamento 2004 di Windows 10 lo strumento di ottimizzazione non memorizza quando è stata eseguita l’ultima ottimizzazione e ciò causa l’esecuzione di molteplici ottimizzazioni che riducono la vita del disco allo stato solido. Ciò ovviamente violerebbe la regola generale secondo cui è meglio non deframmentare le unità a stato solido (SSD) per evitare l’usura non necessaria.

Gli SSD possono invece richiedere di eseguire il TRIM dell’unità per migliorare le prestazioni. Tramite il comando TRIM il sistema operativo comunica al controller dell’SSD quali blocchi sono inutilizzati dopo l’eliminazione di un file, il sistema operativo infatti si limita a contrassegnare i blocchi eliminati come non in uso, mentre il controller provvederà alla cancellazione (a riguarda si veda il post Considerazioni sull’utilizzo degli SSD).

Il bug è stato segnalato ad esempio nella discussione Windows 10 2004 optimization/defrag bug e analizzato in dettaglio nell’articolo Windows 10 Alert: Defragger bug defrags SSD Drives too often in cui vengono riportate le seguenti:

“With the release of Windows 10 version 2004, the Windows Defragger has become a mess as it starts to defrag SSD drives too often, perform trim on non-SSD drives, and forgets when it last optimized a drive.”

 

“When optimizing drives, Windows 10 should record the last time a drive is optimized so that it does not defrag a drive too often.”

 

“As noted by the members at WilderSecurity, with the release of Windows 10 2004, the Optimize Drives feature is not correctly recording the last time a drive has been optimized.”

 

“Due to this, when you go back into the Windows Defragger, you will see that an SSD drive says it ‘Needs Optimization’ even though automatic maintenance was run this morning, as shown below.”

Per quanto riguarda gli impatti di questo bug sulla vita degli SSD si vedano le considerazioni fatte sempre nell’articolo Windows 10 Alert: Defragger bug defrags SSD Drives too often riguardo al fatto che deframmentazione viene eseguita ad ogni riavvio:

“The general rule has always been that you should avoid defragging solid-state drives (SSDs) to prevent unnecessary wear and tear.”

 

“Microsoft developers, though, have stated in the past that there is some benefit to defragging a solid-state drive (SSD) that has become heavily fragmented, and due to this will defrag an SSD drive once a month.

“Actually Scott and Vadim are both wrong. Storage Optimizer will defrag an SSD once a month if volume snapshots are enabled. This is by design and necessary due to slow volsnap copy on write performance on fragmented SSD volumes.””

 

“Unfortunately, since the last optimization times are being forgotten, the Windows 10 automatic maintenance will cause an SSD drive to be defragged much more often than once a month if you commonly restart Windows.”

 

“These automatic drive optimizations are schedule for once a week, but can be configured to be done daily.”

 

“This issue was confirmed in numerous tests by BleepingComputer, where the automatic maintenance tool would perform a defrag of an SSD every time after a reboot. On the other hand, if you launch an optimization directly from the ‘Optimize Drives’ screen, an SSD drive will not be defragged and will only execute the Trim function.”

 

“This is a problem, as defragging an SSD too much is not good for the drive as it could prematurely reduce its lifespan.”

 

“Until this issue is fixed, if you use an SSD drive, it is suggested that you disable the automatic drive optimization of SSD drives in Windows 10.”

Conclusioni

Come indicato nell’articolo Windows 10 Alert: Defragger bug defrags SSD Drives too often se si intende installare la versione 2004 è fortemente consigliato disabilitare l’ottimizzazione dei drive SSD come segue:

Al momento Microsoft non ha riportato il bug tra i Known issues di Windows 10, version 2004 and Windows Server, version 2004, ma ha annunciato di averlo risolto nella Windows 10 Insider Preview Build 19551 come indicato in Announcing Windows 10 Insider Preview Build 19551:

“Thank you for reporting that the Optimize Drives Control Panel was incorrectly showing that optimization hadn’t run on some devices. We’ve fixed it in this build.”

Il secondo issue, ovvero il tentativo di eseguire il TRIM di dischi non-SSD, causa invece la registrazione di un evento di errore che indica che il drive non sopporta l’operazione di retrim come indicato sempre nell’articolo Windows 10 Alert: Defragger bug defrags SSD Drives too often:

Ovviamente ciò è corretto perché un disco non-SSD non supporta la funzionalità di TRIM, il problema sta invece nel fatto che l’ottimizzazione di Windows tenti di eseguire il TRIM su dischi non-SSD.