WalkAbstract

Members
  • Posts

    1
  • Joined

  • Last visited

Everything posted by WalkAbstract

  1. Just wanted to leave a note here about pushing my preclear speed from 2 MB/s to 265 MB/s tl;dr: beef up your CPU cause preclear uses openssl [0] which is very, very CPU heavy OR modify the preclear script to not use AES256-CTR 100% CPU Usage: AMD E-350 -- 2 core, 2 thread, 1.6 GHz 50% CPU Usage: Intel i5-6600 -- 4 core, 4 thread, 3.3 GHz I was getting 100 MB/s on step 1 (pre-read), but only 2 MB/s on step 2 (erase). CPU was at 100% and top showed openssl as the top consumer. I dug into the logs and saw that preclear uses the output from openssl to generate random bits for the erase step. My media server is pretty weak, and was bottlenecking on CPU when running openssl. I moved over to another computer with a much faster CPU and saw my speeds go up by 100x. If you don't have a spare computer lying around, you could modify the preclear script to use something faster. The script uses the AES256-CTR cipher. AES acceleration is probably more important [1] here than raw cores or clock speed. The E-350 doesn't have AES acceleration, but the i5-6600 does. A potential alternative is using a non-AES cipher, like chacha20 [2]. The modified line in the script might look something like: openssl_cmd="openssl enc -chacha20 -pass pass:'${pass}' -nosalt" [0] https://github.com/gfjardim/unRAID-plugins/blob/b45bef5b26d9a3536043376f2b7d349922f35954/source/preclear.disk/script/preclear_disk.sh#L490 [1] https://blog.famzah.net/2015/06/26/openssh-ciphers-performance-benchmark-update-2015/ [2] https://crypto.stackexchange.com/a/52961 edit: Bonus! Was trying to understand why my write speed slows down from 265 MB/s to 150 MB/s. I eventually remembered that hard drives are spinning platters, and more bits are passing under the read/write head at the edges compared to the middle. Doing some quick math shows how big of a difference this makes. # Assumes initial speeds of 265 MB/s, # and platter goes all the way to 3.5 inches # Formula -- speed = distance * (265 / 3.5) Distance from Center (inches) | 1.0 | 1.5 | 2.0 | 2.5 | 3.0 | 3.5 | Read/Write Speed (MB/s) | 75 | 113 | 151 | 189 | 227 | 265 |