diff --git a/common.h b/common.h
index dd7ca6a1017aef64471c908b97a66b8241b3076c..a00b36ffddc7ed4a2491230e1e5d9f77c13d23c6 100644
--- a/common.h
+++ b/common.h
@@ -15,6 +15,9 @@ size_t static_minfree = 512*1048576UL;
 size_t static_maxfree = 2048*1048576UL;
 double split_ratio = 0.5;
 
+/* Default nice value for processes started using compctl --run. */
+#define COMPNICE 12
+
 
 /* Other common definitions. */
 /* See README for the high-level protocol description. */
diff --git a/compctl.c b/compctl.c
index 557125790e7cc38184454f6f3ad58b27785330f0..204f26210701f2e62f3d815c4670e63aeda731aa 100644
--- a/compctl.c
+++ b/compctl.c
@@ -4,6 +4,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
+#include <sys/resource.h>
 #include <sys/socket.h>
 #include <sys/un.h>
 #include <unistd.h>
@@ -104,6 +105,9 @@ run(int argc, char *argv[])
 	}
 	free(line);
 
+	if (setpriority(PRIO_PROCESS, 0, COMPNICE) < 0)
+		perror("Warning: setpriority()");
+
 	char *argvx[argc + 1];
 	for (int i = 0; i < argc; i++)
 		argvx[i] = argv[i];