2

Let's say I'm archiving files from a bind mount in a docker container and want to set a priority for disk time, so I run it like:

ionice -c2 -n7 tar....

Would that work? Would the host OS consider the class/priority that comes from a container (cgroups)?

chingis
  • 1,514
  • 2
  • 19
  • 38

2 Answers2

0

Tests showed that ionice did not have any significant effect on tar performance, instead, I use RAM/CPU docker container limits

chingis
  • 1,514
  • 2
  • 19
  • 38
0

That should make sense:

  • if this tar command is not bottlenecked on CPU for gzip or similar
  • if your system is running with the CFQ IO scheduler for the disk(s) that you are using, according to the notes section of: man ionice

To check your systems configuration try:

for SCHEDULER in /sys/block/*/queue/scheduler; do echo "For disk: ${SCHEDULER}"; cat $SCHEDULER; done

To get an overview of disks and file-systems use:

lsblk

For other possible solutions with Docker v 1.10 features see this answer

JohannesB
  • 2,214
  • 1
  • 11
  • 18