Configurazione del sistema su un disco SSD

image Nel post Considerazioni sull’utilizzo degli SSD avevo indicato come a partire da Windows 7/Windows Server 2008 R2 sono state introdotte una serie funzionalità pensate specificatamente per ottimizzare il sistema quando è installato su un SSD.

Come avevo riportato nel post Support and Q&A for Solid-State Drives viene indicato che sono state state apportate le seguenti ottimizzazioni:

  • Supporto al TRIM
  • Disabilitazione della deframmentazione sui drive sistema SSD
  • Disabilitazione di Superfetch, ReadyBoost, ReadyDrive, boot prefetching e application launch prefetching sui drive sistema SSD
  • Creazione delle partizioni in modo da essere allineate con l’SSD per avere le performance migliori (a riguardo si veda Disk Alignment on Windows 7 for normal disks and SSDs)

In generale come spiegato nel post se durante l’installazione il sistema rileva un disco SSD configura quanto riportato in ogni è possibile verificare che le varie ottimizzazioni siano state eseguite.

Verifica attivazione TRIM

E’ possibile verificare che la funzionalità TRIM sia attivata tramite il comando:

fsutil behavior query DisableDeleteNotify

che deve deve restituire 0 per indicare che il TRIM è attivato i caso contrario può essere attivato con  il comando:

fsutil behavior set DisableDeleteNotify 0

Di seguito quanto W7 esegue per default come riportato in Support and Q&A for Solid-State Drives:

“In Windows 7, if an SSD reports it supports the Trim attribute of the ATA protocol’s Data Set Management command, the NTFS file system will request the ATA driver to issue the new operation to the device when files are deleted and it is safe to erase the SSD pages backing the files. With this information, an SSD can plan to erase the relevant blocks opportunistically (and lazily) in the hope that subsequent writes will not require a blocking erase operation since erased pages are available for reuse.”

“Windows 7 requests the Trim operation for more than just file delete operations. The Trim operation is fully integrated with partition- and volume-level commands like Format and Delete, with file system commands relating to truncate and compression, and with the System Restore (aka Volume Snapshot) feature.”

Disabilitazione deframmentazione

Per disabilitare la deframmentazione schedulata è possibile procedere come segue:

  1. Eseguire il comando dfrgui
  2. Selezionare Configura pianificazione
  3. Deselezionare Esegui in base a una pianificazione (scelta consigliata)

Di seguito quanto W7 esegue per default come riportato in Support and Q&A for Solid-State Drives:

“The automatic scheduling of defragmentation will exclude partitions on devices that declare themselves as SSDs. Additionally, if the system disk has random read performance characteristics above the threshold of 8 MB/sec, then it too will be excluded. The threshold was determined by internal analysis.”

Disabilitazione Superfetch

Per disabilitare la funzionalità di Superfetch è possibile impostare a 0 il valore EnableSuperfetch nella chiave HKLM\SYSTEM\CurrentControlSet\Control\SessionManager\Memory Management\PrefetchParameters quindi riavviare il computer, di seguito i valori possibili:

  • 0 = Disabled
  • 1 = Application launch prefetching enabled
  • 2 = Boot prefetching enabled
  • 3 = Application launch and boot enabled (valore default)

Per informazioni si veda EnableSuperfetch (Windows Embedded Standard 7 Service Pack 1).

In alternativa è possibile disabilitare il servizio Ottimizzazione Avvio (SysMain):

  1. Arrestare il servizio Ottimizzazione avvio (SysMain)
  2. Disabilitare il servizio (per default è impostato Automatico)

Di seguito quanto W7 esegue per default come riportato in Support and Q&A for Solid-State Drives:

“If the system disk is an SSD, and the SSD performs adequately on random reads and doesn’t have glaring performance issues with random writes or flushes, then Superfetch, boot prefetching, application launch prefetching, ReadyBoost and ReadDrive will all be disabled.”

“Initially, we had configured all of these features to be off on all SSDs, but we encountered sizable performance regressions on some systems. In root causing those regressions, we found that some first generation SSDs had severe enough random write and flush problems that ultimately lead to disk reads being blocked for long periods of time. With Superfetch and other prefetching re-enabled, performance on key scenarios was markedly improved.”

Disabilitazione ReadyBoost

Il ReadBoost è una funzionalità con cui il sistema utilizza media USB per il pagefile, utile se si ha poca Ram inoltre l’SSD ora è più veloce dei media USB.

Il ReadyBoost in Windows 7 è gestito tramite il servizio Ottimizzazione avvio (SysMain), disabilitando tale servizio si disabilita la funzionalità.

Disabilitazione Prefetching

Il Prefetching è una funzionalità con cui il sistema mette in RAM parti di eseguibili per velocizzarne l’avvio, con gli SSD non è più necessario e si libera RAM)

Per disabilitare la funzionalità di  è possibile impostare a 0 il valore EnablePrefetcher nella chiave HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\
Memory Management\PrefetchParameters quindi riavviare il computer, di seguito i valori possibili:

  • 0 = Disabled
  • 1 = Application start prefetching enabled
  • 2 = Boot prefetching enabled
  • 3 = Application start and boot enabled (valore di default)

Per informazioni si veda Disable Prefetch (Windows Embedded Standard 7 Service Pack 1).

Conclusioni

In generale Windows 7/Windows Server 2008 R2 e successivi dovrebbero già essere configurati correttamente per essere eseguiti su disco SSD, ma tranquillità è possibile eseguire le seguenti operazioni:

  • Verificare che la funzionalità TRIM sia utilizzata
  • Disabilitare il servizio Ottimizzazione avvio (SysMain)

Dal momento che utilizzare un disco SSD implica configurazioni diverse è sconsigliabile eseguire la clonazione di un sistema installato su HD non SSD.

Per ulteriori informazioni si vedano anche:

[Update 01]

Si vedano anche la KB 2727880 Windows 7 & SSD: defragmentation, SuperFetch, prefetch e le seguenti KB (purtroppo al momento disponibili solo in tedesco):

  • 2727881 Windows 7 & SSD: disable hibernation
  • 2727882 Windows 7 & SSD: Disable System Restore
  • 2727883 Windows 7 & SSD: moving the paging file