diff --git a/include/utils.h b/include/utils.h
index 53d5b9e3f..ad130a44a 100644
--- a/include/utils.h
+++ b/include/utils.h
@@ -13,6 +13,8 @@
 #include <errno.h>
 #include <string.h>
 
+#include <sched.h>
+
 struct settings;
 struct sockaddr_in;
 struct sockaddr;
@@ -44,18 +46,6 @@ void print(enum log_level lvl, const char *fmt, ...);
  */
 int resolve_addr(const char *addr, struct sockaddr_in *sa, int flags);
 
-/** Setup various realtime related things.
- *
- * We use the following techniques for performance tuning
- *  - Prefault the stack
- *  - Lock memory
- *  - Use FIFO scheduler with realtime priority
- *  - Set CPU affinity
- *
- * @param g The global configuration
- */
-void init_realtime(struct settings *g);
-
 /** Compare two socket addresses based on their family and address.
  *
  * Only the family and the address is compared.
@@ -69,6 +59,13 @@ void init_realtime(struct settings *g);
  */
 int sockaddr_cmp(struct sockaddr *a, struct sockaddr *b);
 
+/** Convert integer into cpu_set_t
+ *
+ * @param set A cpu bitmask
+ * @return The opaque cpu_set_t datatype
+ */
+cpu_set_t to_cpu_set_t(int set);
+
 /** Append an element to a single linked list */
 #define list_add(list, elm) do { \
 		elm->next = list; \
diff --git a/src/server.c b/src/server.c
index fe2797ae0..c757b39b7 100644
--- a/src/server.c
+++ b/src/server.c
@@ -9,9 +9,13 @@
 #include <stdio.h>
 #include <error.h>
 
+#include <sched.h>
 #include <signal.h>
 #include <unistd.h>
 #include <arpa/inet.h>
+#include <sys/mman.h>
+#include <sys/types.h>
+#include <sys/stat.h>
 
 #include "config.h"
 #include "cfg.h"
@@ -114,8 +118,39 @@ int main(int argc, char *argv[])
 	if (!paths)
 		error("No paths found. Terminating...");
 
-	/* Setup various realtime related things */
-	init_realtime(&settings);
+	/* Lock memory */
+	/*if(mlockall(MCL_CURRENT | MCL_FUTURE))
+		perror("Failed mlockall");
+	else
+		debug(3, "Locked memory");*/
+
+	/* Prefault stack */
+	/*char dummy[MAX_SAFE_STACK];
+	memset(dummy, 0, MAX_SAFE_STACK);
+	debug(3, "Prefaulted stack");*/
+
+	/* Check for realtime kernel patch */
+	struct stat st;
+	if (stat("/sys/kernel/realtime", &st))
+		warn("This is not a a realtime patched kernel!");
+	else
+		debug(3, "This is a realtime patched kernel");
+
+	/* Use FIFO scheduler with realtime priority */
+	struct sched_param param;
+	param.sched_priority = settings.priority;
+	if (sched_setscheduler(0, SCHED_FIFO, &param))
+		perror("Failed to set realtime priority");
+	else
+		debug(3, "Set task priority to %u", settings.priority);
+
+	/* Pin threads to CPUs by setting the affinity */
+	cpu_set_t cset = to_cpu_set_t(settings.affinity);
+	pid_t pid = getpid();
+	if (sched_setaffinity(pid, sizeof(cset), &cset))
+		perror("Failed to set CPU affinity");
+	else
+		debug(3, "Set affinity to %#x", settings.affinity);
 
 	/* Connect all nodes and start one thread per path */
 	start();
diff --git a/src/utils.c b/src/utils.c
index 8d35c5aab..af2ba1973 100644
--- a/src/utils.c
+++ b/src/utils.c
@@ -10,16 +10,11 @@
 #include <string.h>
 #include <time.h>
 #include <errno.h>
-#include <sched.h>
 #include <unistd.h>
 #include <netdb.h>
-#include <sched.h>
 
 #include <netinet/in.h>
 #include <arpa/inet.h>
-#include <sys/mman.h>
-#include <sys/types.h>
-#include <sys/stat.h>
 
 #include "config.h"
 #include "cfg.h"
@@ -113,7 +108,7 @@ int sockaddr_cmp(struct sockaddr *a, struct sockaddr *b)
 	return -1;
 }
 
-static cpu_set_t to_cpu_set_t(int set)
+cpu_set_t to_cpu_set_t(int set)
 {
 	cpu_set_t cset;
 
@@ -124,40 +119,3 @@ static cpu_set_t to_cpu_set_t(int set)
 
 	return cset;
 }
-
-void init_realtime(struct settings *g)
-{
-	/* Prefault stack */
-	char dummy[MAX_SAFE_STACK];
-	memset(dummy, 0, MAX_SAFE_STACK);
-	debug(3, "Prefaulted stack");
-
-	/* Lock memory */
-	if(mlockall(MCL_CURRENT | MCL_FUTURE))
-		perror("Failed mlockall");
-	else
-		debug(3, "Locked memory");
-
-	/* Check for realtime kernel patch */
-	struct stat st;
-	if (stat("/sys/kernel/realtime", &st))
-		warn("This is not a a realtime patched kernel!");
-	else
-		debug(3, "This is a realtime patched kernel");
-
-	/* Use FIFO scheduler with realtime priority */
-	struct sched_param param;
-	param.sched_priority = g->priority;
-	if (sched_setscheduler(0, SCHED_FIFO, &param))
-		perror("Failed to set realtime priority");
-	else
-		debug(3, "Set task priority to %u", g->priority);
-
-	/* Pin threads to CPUs by setting the affinity */
-	cpu_set_t cset = to_cpu_set_t(g->affinity);
-	pid_t pid = getpid();
-	if (sched_setaffinity(pid, sizeof(cset), &cset))
-		perror("Failed to set CPU affinity");
-	else
-		debug(3, "Set affinity to %#x", g->affinity);
-}