In my C application, the main process forks a child process and then sleeps for ten microseconds to give the child time to get ready. After the sleep period, the parent process sends a signal to the child process to start listening on the specified port.
This code executed fine in CentOS6, and there were only few instances where the sleep period was not enough for the child process to setup its signal handlers before the signal from the parent was delivered. When this code was run in CentOS7 with the same system specifications, however, the child consistently failed to install its signal handlers in time. I had to increase the sleep period to 10 milliseconds (1000 times longer) to get the same performance as I was getting in CentOS6.
I would like to know what might be reasons for context switching to be so slow in CentOS 7 relative to CentOS 6 on same-spec hardware?