1 00:00:00,000 --> 00:00:10,880 So first thing that we need to do, we need to calculate the default rate on the slice 2 00:00:10,880 --> 00:00:16,440 is 100. That goes for services as well. So if I need system slice to be four times as 3 00:00:16,440 --> 00:00:29,320 high, I need system CTL set property on system dot slice. And the property is CPU weight 4 00:00:29,320 --> 00:00:39,400 is 400. So that is one. Then I'm going to run my system CTL start stress one dot service. 5 00:00:39,400 --> 00:00:44,639 It's very important to do this as a system D unit, because then you can be sure it's 6 00:00:44,639 --> 00:00:52,680 in the system slides. Next is the root user. I'm going to use DD. IF is dev zero. OF is 7 00:00:52,680 --> 00:00:58,919 dev null or better. Let me use well true so that we can see difference. Well true, do 8 00:00:58,919 --> 00:01:06,080 true, done. That's not a process that is going to generate a lot of overhead. Then 9 00:01:06,080 --> 00:01:12,760 I'm using top. And what do we see? We see that the DD process is getting 80% and the 10 00:01:12,760 --> 00:01:19,959 batch process is getting 20%. Interesting thing learned from this, a root shell process 11 00:01:19,959 --> 00:01:25,919 runs in the user slice, not in the system slice. You may have expected the root processes 12 00:01:25,919 --> 00:01:32,160 to run in the system slice. That is not the case. Now, before you are getting out of here, 13 00:01:32,160 --> 00:01:40,959 don't forget to get back to the original situation. First, kill all DD. Next, maybe do it from 14 00:01:40,959 --> 00:01:50,239 top. Kill the root batch process as well. That script that was just started. And that 15 00:01:50,239 --> 00:01:57,599 didn't work out all right. 4, 7, 5, 7. And what is going on? Well, I'm killing 4, 7, 16 00:01:57,599 --> 00:02:03,320 5, 7. And it comes back and comes back and comes back. Oh, no. Why does it come back? 17 00:02:03,320 --> 00:02:09,559 Because it's an infinite loop. Well true, do true, done. And I kill it. It starts again. 18 00:02:09,559 --> 00:02:19,919 Now it is gone. And next, I should not forget to set my default CPU weight back. And also, 19 00:02:19,919 --> 00:02:32,479 ECHO1, greater than, Sys, Bus, CPU, Devices, CPU1, Online. Because that will give you a 2-CPU system again. 20 00:02:32,479 --> 00:02:33,119 And that's all.