For the context of Linux has been no special attention to its reasonable scope should be how much (about the concept of context switching, there are a lot of explanations on the Internet, again no longer repeat), the occasional notice during the day, the evening specifically looked at the next day load and after the load and after the following (server 1,8C/16GB, Run 1 mysql,8 Java processes, 1 rabbitmq):
The context switch for the corresponding time period is as follows:
Overall, the context is around 2000-2500 during server idle time.
server 2 (1 MySQL, this is our optimized market and wind control after the load, the original average around 45%):
Server 3 (1 mysql):
As for when the load is busy, the context switch should be what the value is, depending on the type of system (CPU-intensive or IO-intensive) and how many processes and threads are running.
If the system% is relatively high, setting the binding process through Taskset to a specific CPU may have some relief (taskset is not so much to let the process bind on a particular CPU, rather than set a higher priority).
What should be the reasonable CPU of system% and user%?
As a reference or experience summary:
1. For each CPU to run the queue do not exceed 3, for example, if the dual-core CPU should not exceed 6;
2. If the CPU is running at full load, the following distribution should be met
A) User time:65%~70%
b) System time:30%~35%
c) idle:0%~5%
PS: For the concept of context switching, refer to: http://blog.sina.com.cn/s/blog_4adc4b090102vufu.html
About context switches in Linux