[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Throttle dev.raid.speed_limit_max to 1000 during preseed for package installs



I'm trying to find a work-around for the following bug: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=838503
Package installs during imaging of a new Stretch host with a simple raid1 system disk takes ~2000 seconds. The packages installs on an equivalent Jessie install take ~300 seconds. This may not be much of an issue for isolated host installs, but I’m looking to speed up and automate the process to facilitate bulk imaging.
I've found that when imaging a Stretch host, if I console in and `echo 1000 > /proc/sys/dev/raid/speed_limit_max` I can throttle the raid sync and greatly speed up package installs. But I have thus far only been able to do this manually. I'm trying to find a way of setting this value early enough in preseed that it applies throughout the bulk of the package installs. So far I’ve attempted the following approaches (and more) without success:

  • d-i preseed/early_command   string  echo "dev.raid.speed_limit_max = 1000" >> /etc/sysctl.conf
    • No /etc/sysctl.conf file is found when I console in to check
  • d-i preseed/include_command   string echo 1000 > /proc/sys/dev/raid/speed_limit_max
    • When I check on the value after the command should have run, it is still the default of “200000”
  • d-i preseed/late_command   string  echo 1000 > /proc/sys/dev/raid/speed_limit_max
    • When I check on the value after the command should have run, it is still the default of “200000”
  • I can set the value through a late_script, but that runs well after most of the packages have already installed.
  • The command sysctl doesn’t seem to exist for this version of BusyBox (BusyBox v1.22.1).

 

Can anyone provide recommendations for the appropriate method for setting this kernel parameter during preseed at a point early enough to be useful?

 

 


Reply to: