With FreeBSD 11, the system behaves sluggishly while copying large amounts of files from the system partition to another hard drive. Any time an operation is performed (like opening a terminal) for which access to the system partition is necessary, lags up to a few seconds happen. Is there any way to avoid this, to deprioritize the HD access of the cp command? Renicing does not help.

  • 100 MB/s is 800Mbps... – Rui F Ribeiro Aug 26 '17 at 12:29
  • 3
    AFAIK 100MB/s sequential read/write is quite decent for spinning drives. Wouldn't be too surprised either if it slows down system response if one of the drives is also the system drive. – Tom Yan Aug 26 '17 at 12:36
  • 1
    You don't need nice, but ionice – Philippos Sep 5 '17 at 7:14
  • @Philippos ionice does exist under FreeBSD??? – wolf-revo-cats Sep 9 '17 at 17:07
  • Possible duplicate of What to do when "nice" isn't good enough (FreeBSD) – Philippos Sep 11 '17 at 7:18

Try looking at idprio and set cp to an idle time priority to run when no other tasks are waiting to be run. Read the idprio manual for potential caveats.

There may also be some tweakable filesystem options depending on what filesystem you are running.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.