Remove RT priority, use niceness.
authorRusty Russell <rusty@rustcorp.com.au>
Wed, 16 Dec 2009 08:56:22 +0000 (19:26 +1030)
committerRusty Russell <rusty@rustcorp.com.au>
Wed, 16 Dec 2009 08:56:22 +0000 (19:26 +1030)
commit482c302d46e2162d0cf552f8456bc49573ae729d
tree847f99f4c07f2640c95f5f9c6509fb9a53e465ff
parent2ee86cc1f311d7b7504c7b14d142b9c4f6f4b469
Remove RT priority, use niceness.

1) It's buggy.  Code needs to be carefully written (ie. no busy
   loops) to handle running with it, and we fork and run scripts.[1]

2) It makes debugging harder.  If ctdbd loops (as has happened recently)
   it can be extremely hard to get in and see what's happening.  We've already
   seen the valgrind hacks.

3) We have seen recent scheduler problems.  Perhaps they are unrelated,
   but removing this very unusual setup is unlikely to hurt.

4) It doesn't make anything faster.  Under all but the most perverse of
   circumstances, 99% of the cpu gives the same performance as 100%, and
   we will always preempt normal processes anyway.

[1] I made this worse in 0fafdcb8d353 "eventscript: fork() a child for
    each script" by removing the switch_from_server_to_client() which
    restored it, but even that was only for monitor scripts.  Others were
    run with RT priority.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
client/ctdb_client.c
common/ctdb_util.c
include/ctdb_private.h
server/ctdb_daemon.c
server/ctdbd.c