#154 Reserve some I/O, CPU, and memory for critical session processes
Closed: Fixed a year ago by catanzaro. Opened a year ago by catanzaro.

Splitting this out of #98, @benzea has been working on setting up gnome-session to reserve some CPU, I/O, and memory for critical session processes. We have learned from Facebook that all three are required in order to maintain system responsiveness under heavy memory load. We have also learned that setting limits is not necessary doesn't really make sense; we want to reserve minimums for our critical processes to use if they need it, without arbitrary limits on other processes.

The I/O limit currently works best with btrfs, suggesting that we might need btrfs to achieve our goal of protecting desktop session responsiveness under heavy memory pressure.

@benzea, a status update on the cgroup work would be wonderful.


The Btrfs change proposal is being tracked in #153.

There isn't much to say unfortunately.

A lot of this can be easily done. The biggest change from a distribution point of view will be that we need to pull in another package (with software that is not finished yet). Right now I am calling it uresourced, it does not yet work though.

All it does is allocating memory guarantees. That is, modifying systemd properties of user.slice, user-X.slice and user@X.service depending on whether the user has an active session (logind) and a few other heuristics. Pretty straight forward, I just need to get around to it.

Now, adding this package is a major change. And it is a package that should probably only be installed on the workstation (and similar) spins; even if it should not have any negative impact as long as no graphical seat exists.

The other side of it is adjusting a few .service/.scope files on the GNOME side. This is really straight forward (and standardised in https://systemd.io/DESKTOP_ENVIRONMENTS/). There are a few further pain-points here, but that is not relevant in this context. Overall, the above package can also safely take care of this as a stop-gap solution.

So, to summarize, the urgent thing here is writing/testing/adding uresourced (open for other names!). Seems like the deadline may be 2020-06-30 (if this is a system wide change, 2020-07-21 if this is a self-contained change).

EDIT: uresourced is designed to solve https://github.com/systemd/systemd/issues/15028, ideally it would be obsoleted again in the future.

So, to summarize, the urgent thing here is writing/testing/adding uresourced (open for other names!). Seems like the deadline may be 2020-06-30 (if this is a system wide change, 2020-07-21 if this is a self-contained change).

It's a system-wide change, so clearly it's not reasonable to expect you to make that deadline. How about we aim to land this in rawhide immediately after F33 is branched?

(the following is from Tejun Heo, I'm just relaying it here)

IO control test case for btrfs and ext4 comparison

Test setup

  • Two fedora instances running on two partitions on wd3200bekt 7200 rpm hard disk. One on btrfs, the other ext4.
  • Two 32G testfiles created - dd if=/dev/zero of=testfilesX bs=1G count=32 status=progress. After the two files are created, drop caches with echo 3 > /proc/sys/vm/drop_caches.
  • test-rawio.c used to generate load and monitor latencies. Built with gcc -Wall -O2 -o test-rawio test-rawio.c -lpthread -laio.
  • The difference is easier to see with io.latency. Two cgroups are created /sys/fs/cgroup/high and /sys/fs/cgroup/low. The high cgroup has io latency target set at 25ms - echo '8:X target=25000 > /sys/fs/cgroup/high/io.latency.
  • High cgroup runs ./test-rawio testfile0 32 1 bw. Low cgroup runs ./test-rawio testfile1 32 32 bw.

Result summary

Each operation is 16k buffered read followed by write on a random location. If IO control is effective, the latencies observed in the high cgroup should deteriorate uncontrollably.

On ext4, we see p99 latency spiking above 10s regularly. The last time we chased it down this was caused by ext4 creating strict ordering across IOs from different cgroups through journal transactions. High pri cgroup ends up stuck behind low pri cgroup and their latencies spike together.

On btrfs, the coupling doesn’t occur and high pri cgroup latency stays within an a lot more reasonable range.

Results on ext4

High cgroup:

root@rbw ~# ./test-rawio testfile0 32 1 bw
testfile0 block_size=4096 nr_blocks=8388608 (32.00GiB)
005.0: ok=296 err=0 iops=59.200 avg/p90/p95/p99(ms)=16.919:22.500:33.500:103.500
010.0: ok=178 err=0 iops=35.600 avg/p90/p95/p99(ms)=28.132:65.500:98.500:156.500
015.0: ok=197 err=0 iops=39.400 avg/p90/p95/p99(ms)=25.384:39.500:65.500:275.500
020.0: ok=198 err=0 iops=39.600 avg/p90/p95/p99(ms)=24.261:35.000:35.000:1085.000
025.0: ok=81 err=0 iops=16.200 avg/p90/p95/p99(ms)=64.317:195.000:345.000:10005.000
030.1: ok=213 err=0 iops=42.600 avg/p90/p95/p99(ms)=23.485:25.000:45.000:85.000
035.1: ok=57 err=0 iops=11.400 avg/p90/p95/p99(ms)=87.970:385.000:535.000:10005.000
040.1: ok=111 err=0 iops=22.200 avg/p90/p95/p99(ms)=45.141:115.000:145.000:1155.000
045.1: ok=254 err=0 iops=50.800 avg/p90/p95/p99(ms)=19.707:35.000:35.000:65.000
050.1: ok=274 err=0 iops=54.800 avg/p90/p95/p99(ms)=18.248:28.500:32.500:55.500
055.1: ok=156 err=0 iops=31.200 avg/p90/p95/p99(ms)=26.995:35.500:47.500:361.500
060.1: ok=150 err=0 iops=30.000 avg/p90/p95/p99(ms)=38.102:35.000:175.000:1175.000
065.1: ok=150 err=0 iops=30.000 avg/p90/p95/p99(ms)=32.667:35.000:125.000:435.000
070.1: ok=108 err=0 iops=21.600 avg/p90/p95/p99(ms)=47.990:45.000:55.000:1475.000
075.1: ok=114 err=0 iops=22.800 avg/p90/p95/p99(ms)=43.120:65.000:275.000:675.000
080.1: ok=23 err=0 iops=4.600 avg/p90/p95/p99(ms)=207.306:425.000:3085.000:10005.000
085.1: ok=204 err=0 iops=40.800 avg/p90/p95/p99(ms)=25.921:25.000:35.000:425.000
090.1: ok=239 err=0 iops=47.800 avg/p90/p95/p99(ms)=21.241:35.000:35.000:155.000
095.1: ok=194 err=0 iops=38.800 avg/p90/p95/p99(ms)=25.761:37.500:54.500:317.500
100.1: ok=163 err=0 iops=32.600 avg/p90/p95/p99(ms)=30.181:43.500:174.500:364.500
105.1: ok=196 err=0 iops=39.200 avg/p90/p95/p99(ms)=26.042:37.500:63.500:303.500
110.2: ok=91 err=0 iops=18.200 avg/p90/p95/p99(ms)=55.038:43.500:425.500:1000.500
115.2: ok=197 err=0 iops=39.400 avg/p90/p95/p99(ms)=24.420:29.500:39.500:922.500
120.6: ok=16 err=0 iops=3.200 avg/p90/p95/p99(ms)=348.476:2025.000:10005.000:10005.000
125.6: ok=146 err=0 iops=29.200 avg/p90/p95/p99(ms)=34.388:35.000:45.000:1035.000
130.6: ok=290 err=0 iops=58.000 avg/p90/p95/p99(ms)=17.254:25.000:35.000:55.000
135.6: ok=174 err=0 iops=34.800 avg/p90/p95/p99(ms)=28.846:32.500:46.500:802.500
140.6: ok=139 err=0 iops=27.800 avg/p90/p95/p99(ms)=36.004:48.500:186.500:740.500
145.6: ok=138 err=0 iops=27.600 avg/p90/p95/p99(ms)=36.188:35.000:65.000:1015.000
150.6: ok=172 err=0 iops=34.400 avg/p90/p95/p99(ms)=24.228:25.000:35.000:475.000
155.6: ok=11 err=0 iops=2.200 avg/p90/p95/p99(ms)=531.977:2725.000:10005.000:10005.000
160.6: ok=221 err=0 iops=44.200 avg/p90/p95/p99(ms)=22.706:35.000:45.000:55.000
165.6: ok=212 err=0 iops=42.400 avg/p90/p95/p99(ms)=23.505:25.000:35.000:55.000
170.6: ok=158 err=0 iops=31.600 avg/p90/p95/p99(ms)=31.679:35.000:65.000:725.000
175.6: ok=138 err=0 iops=27.600 avg/p90/p95/p99(ms)=36.156:37.500:261.500:783.500
180.7: ok=144 err=0 iops=28.800 avg/p90/p95/p99(ms)=34.996:45.000:75.000:1145.000
185.7: ok=107 err=0 iops=21.400 avg/p90/p95/p99(ms)=43.847:45.000:235.000:845.000
190.7: ok=27 err=0 iops=5.400 avg/p90/p95/p99(ms)=185.664:635.000:1095.000:10005.000
195.7: ok=201 err=0 iops=40.200 avg/p90/p95/p99(ms)=26.512:35.000:35.000:495.000
200.7: ok=203 err=0 iops=40.600 avg/p90/p95/p99(ms)=23.708:29.500:33.500:334.500
205.7: ok=156 err=0 iops=31.200 avg/p90/p95/p99(ms)=33.232:42.500:135.500:490.500
210.7: ok=180 err=0 iops=36.000 avg/p90/p95/p99(ms)=27.938:39.500:47.500:415.500
215.7: ok=131 err=0 iops=26.200 avg/p90/p95/p99(ms)=38.214:45.000:45.000:1665.000
220.7: ok=181 err=0 iops=36.200 avg/p90/p95/p99(ms)=27.556:35.000:55.000:515.000

Low cgroup:

root@rbw ~# ./test-rawio testfile1 32 32 bw
testfile1 block_size=4096 nr_blocks=8388608 (32.00GiB)
005.0: ok=154 err=0 iops=30.800 avg/p90/p95/p99(ms)=813.488:3285.000:4125.000:4335.000
010.0: ok=177 err=0 iops=35.400 avg/p90/p95/p99(ms)=998.286:1195.000:3275.000:4775.000
015.0: ok=77 err=0 iops=15.400 avg/p90/p95/p99(ms)=2220.564:4825.000:4845.000:10005.000
020.0: ok=155 err=0 iops=31.000 avg/p90/p95/p99(ms)=774.108:1165.000:1225.000:2115.000
025.0: ok=26 err=0 iops=5.200 avg/p90/p95/p99(ms)=2761.334:3485.000:3785.000:10005.000
048.9: ok=22 err=0 iops=0.957 avg/p90/p95/p99(ms)=27841.958:28850.000:29750.000:100050.000
053.9: ok=243 err=0 iops=48.600 avg/p90/p95/p99(ms)=1754.660:950.000:1450.000:28850.000
058.9: ok=210 err=0 iops=42.000 avg/p90/p95/p99(ms)=765.563:1050.000:1150.000:1850.000
063.9: ok=163 err=0 iops=32.600 avg/p90/p95/p99(ms)=736.652:995.000:1065.000:2035.000
068.9: ok=84 err=0 iops=16.800 avg/p90/p95/p99(ms)=2513.663:4005.000:4095.000:10005.000
073.9: ok=39 err=0 iops=7.800 avg/p90/p95/p99(ms)=1717.841:2475.000:2755.000:10005.000
087.7: ok=21 err=0 iops=1.615 avg/p90/p95/p99(ms)=16654.127:17250.000:17250.000:100050.000
092.7: ok=191 err=0 iops=38.200 avg/p90/p95/p99(ms)=1782.799:1450.000:16150.000:16750.000
097.7: ok=213 err=0 iops=42.600 avg/p90/p95/p99(ms)=776.578:1150.000:1250.000:1650.000
102.8: ok=147 err=0 iops=29.400 avg/p90/p95/p99(ms)=941.521:1415.000:1495.000:2325.000
107.8: ok=79 err=0 iops=15.800 avg/p90/p95/p99(ms)=1777.617:2695.000:3135.000:10005.000
112.8: ok=77 err=0 iops=15.400 avg/p90/p95/p99(ms)=2205.652:4885.000:4925.000:10005.000
117.8: ok=11 err=0 iops=2.200 avg/p90/p95/p99(ms)=4769.172:6405.000:10005.000:10005.000
122.8: ok=22 err=0 iops=4.400 avg/p90/p95/p99(ms)=7030.154:7315.000:7325.000:10005.000
128.8: ok=24 err=0 iops=4.000 avg/p90/p95/p99(ms)=11022.888:14550.000:14550.000:100050.000
133.8: ok=221 err=0 iops=44.200 avg/p90/p95/p99(ms)=1058.017:1150.000:1250.000:10150.000
138.8: ok=177 err=0 iops=35.400 avg/p90/p95/p99(ms)=796.686:1050.000:1050.000:1550.000
143.8: ok=29 err=0 iops=5.800 avg/p90/p95/p99(ms)=2373.129:4515.000:4515.000:10005.000
148.8: ok=70 err=0 iops=14.000 avg/p90/p95/p99(ms)=2959.064:7425.000:7465.000:10005.000
153.8: ok=31 err=0 iops=6.200 avg/p90/p95/p99(ms)=5221.613:6175.000:6855.000:10005.000
161.0: ok=19 err=0 iops=2.714 avg/p90/p95/p99(ms)=8332.263:12150.000:100050.000:100050.000
166.0: ok=243 err=0 iops=48.600 avg/p90/p95/p99(ms)=1219.374:1050.000:9250.000:10850.000
171.0: ok=213 err=0 iops=42.600 avg/p90/p95/p99(ms)=740.621:1050.000:1150.000:1350.000
176.1: ok=158 err=0 iops=31.600 avg/p90/p95/p99(ms)=784.849:1965.000:2285.000:2505.000
181.1: ok=121 err=0 iops=24.200 avg/p90/p95/p99(ms)=1563.055:3065.000:3265.000:3855.000
186.1: ok=88 err=0 iops=17.600 avg/p90/p95/p99(ms)=1023.592:2585.000:2795.000:10005.000
191.1: ok=17 err=0 iops=3.400 avg/p90/p95/p99(ms)=4534.096:6785.000:10005.000:10005.000
196.9: ok=11 err=0 iops=2.200 avg/p90/p95/p99(ms)=11684.919:12050.000:100050.000:100050.000
201.9: ok=239 err=0 iops=47.800 avg/p90/p95/p99(ms)=1593.036:1450.000:10650.000:12950.000
206.9: ok=170 err=0 iops=34.000 avg/p90/p95/p99(ms)=919.076:1750.000:1850.000:2150.000
211.9: ok=235 err=0 iops=47.000 avg/p90/p95/p99(ms)=692.258:1415.000:1465.000:2005.000
216.9: ok=152 err=0 iops=30.400 avg/p90/p95/p99(ms)=897.540:1715.000:1785.000:1805.000
221.9: ok=88 err=0 iops=17.600 avg/p90/p95/p99(ms)=2037.472:4825.000:5175.000:10005.000
226.9: ok=45 err=0 iops=9.000 avg/p90/p95/p99(ms)=2063.493:3655.000:3945.000:10005.000
242.0: ok=35 err=0 iops=2.333 avg/p90/p95/p99(ms)=14075.229:17950.000:17950.000:100050.000
247.0: ok=182 err=0 iops=36.400 avg/p90/p95/p99(ms)=1181.164:1150.000:1450.000:12450.000
252.0: ok=205 err=0 iops=41.000 avg/p90/p95/p99(ms)=780.734:1150.000:1250.000:1350.000
257.0: ok=158 err=0 iops=31.600 avg/p90/p95/p99(ms)=1032.344:1655.000:1695.000:2205.000
262.0: ok=70 err=0 iops=14.000 avg/p90/p95/p99(ms)=1123.038:2345.000:4225.000:10005.000
267.0: ok=18 err=0 iops=3.600 avg/p90/p95/p99(ms)=4720.257:5025.000:10005.000:10005.000

Results on btrfs

High cgroup:

root@rbw ~# ./test-rawio testfile0 32 1 bw
testfile0 block_size=4096 nr_blocks=8014881 (30.57GiB)
005.0: ok=84 err=0 iops=16.800 avg/p90/p95/p99(ms)=58.516:120.500:133.500:1000.500
010.0: ok=106 err=0 iops=21.200 avg/p90/p95/p99(ms)=47.685:110.500:139.500:223.500
015.0: ok=88 err=0 iops=17.600 avg/p90/p95/p99(ms)=57.000:134.500:271.500:1000.500
020.0: ok=107 err=0 iops=21.400 avg/p90/p95/p99(ms)=46.827:92.500:120.500:457.500
025.0: ok=139 err=0 iops=27.800 avg/p90/p95/p99(ms)=36.040:79.500:92.500:171.500
030.0: ok=146 err=0 iops=29.200 avg/p90/p95/p99(ms)=34.264:76.500:93.500:199.500
035.0: ok=119 err=0 iops=23.800 avg/p90/p95/p99(ms)=40.642:82.500:117.500:493.500
040.1: ok=92 err=0 iops=18.400 avg/p90/p95/p99(ms)=55.935:93.500:213.500:1000.500
045.1: ok=170 err=0 iops=34.000 avg/p90/p95/p99(ms)=29.793:58.500:70.500:127.500
050.1: ok=159 err=0 iops=31.800 avg/p90/p95/p99(ms)=31.254:58.500:69.500:305.500
055.1: ok=156 err=0 iops=31.200 avg/p90/p95/p99(ms)=32.332:64.500:87.500:542.500
060.1: ok=128 err=0 iops=25.600 avg/p90/p95/p99(ms)=38.966:65.500:240.500:273.500
065.1: ok=132 err=0 iops=26.400 avg/p90/p95/p99(ms)=37.810:45.000:75.000:1245.000
070.1: ok=206 err=0 iops=41.200 avg/p90/p95/p99(ms)=24.478:55.000:65.000:105.000
075.1: ok=139 err=0 iops=27.800 avg/p90/p95/p99(ms)=36.020:55.500:172.500:584.500
080.1: ok=162 err=0 iops=32.400 avg/p90/p95/p99(ms)=30.695:45.500:72.500:362.500
085.1: ok=169 err=0 iops=33.800 avg/p90/p95/p99(ms)=29.821:54.500:93.500:317.500
090.1: ok=132 err=0 iops=26.400 avg/p90/p95/p99(ms)=33.658:55.500:148.500:225.500
095.1: ok=174 err=0 iops=34.800 avg/p90/p95/p99(ms)=31.940:48.500:71.500:849.500
100.1: ok=171 err=0 iops=34.200 avg/p90/p95/p99(ms)=27.859:51.500:74.500:385.500
105.1: ok=172 err=0 iops=34.400 avg/p90/p95/p99(ms)=30.438:48.500:87.500:420.500
110.1: ok=151 err=0 iops=30.200 avg/p90/p95/p99(ms)=32.639:89.500:151.500:249.500
115.1: ok=177 err=0 iops=35.400 avg/p90/p95/p99(ms)=28.835:47.500:61.500:555.500
120.2: ok=187 err=0 iops=37.400 avg/p90/p95/p99(ms)=26.733:46.500:144.500:196.500
125.2: ok=156 err=0 iops=31.200 avg/p90/p95/p99(ms)=32.092:64.500:105.500:469.500
130.2: ok=187 err=0 iops=37.400 avg/p90/p95/p99(ms)=26.744:52.500:98.500:212.500
135.2: ok=192 err=0 iops=38.400 avg/p90/p95/p99(ms)=25.430:44.500:74.500:154.500
140.2: ok=181 err=0 iops=36.200 avg/p90/p95/p99(ms)=28.321:59.500:139.500:219.500
145.2: ok=191 err=0 iops=38.200 avg/p90/p95/p99(ms)=26.223:41.500:137.500:175.500
150.2: ok=195 err=0 iops=39.000 avg/p90/p95/p99(ms)=25.700:45.500:125.500:162.500
155.2: ok=158 err=0 iops=31.600 avg/p90/p95/p99(ms)=31.675:60.500:105.500:463.500
160.2: ok=166 err=0 iops=33.200 avg/p90/p95/p99(ms)=30.169:44.500:118.500:860.500
165.2: ok=210 err=0 iops=42.000 avg/p90/p95/p99(ms)=23.697:39.500:79.500:147.500
170.2: ok=185 err=0 iops=37.000 avg/p90/p95/p99(ms)=27.153:44.500:81.500:260.500
175.2: ok=218 err=0 iops=43.600 avg/p90/p95/p99(ms)=23.005:41.500:48.500:71.500
180.2: ok=231 err=0 iops=46.200 avg/p90/p95/p99(ms)=21.672:35.500:44.500:175.500
185.2: ok=171 err=0 iops=34.200 avg/p90/p95/p99(ms)=29.301:72.500:129.500:191.500
190.2: ok=163 err=0 iops=32.600 avg/p90/p95/p99(ms)=30.302:56.500:111.500:443.500
195.2: ok=150 err=0 iops=30.000 avg/p90/p95/p99(ms)=33.656:98.500:138.500:332.500
200.3: ok=182 err=0 iops=36.400 avg/p90/p95/p99(ms)=27.016:66.500:122.500:168.500
205.3: ok=175 err=0 iops=35.000 avg/p90/p95/p99(ms)=29.142:54.500:134.500:178.500
210.3: ok=208 err=0 iops=41.600 avg/p90/p95/p99(ms)=24.019:37.500:71.500:150.500

Low cgroup:

root@rbw ~# ./test-rawio testfile1 32 32 bw
testfile1 block_size=4096 nr_blocks=8388608 (32.00GiB)
005.0: ok=65 err=0 iops=13.000 avg/p90/p95/p99(ms)=1768.931:3205.000:3515.000:10005.000
010.0: ok=58 err=0 iops=11.600 avg/p90/p95/p99(ms)=2775.452:3965.000:4535.000:10005.000
015.0: ok=96 err=0 iops=19.200 avg/p90/p95/p99(ms)=1829.309:3305.000:4035.000:10005.000
020.0: ok=90 err=0 iops=18.000 avg/p90/p95/p99(ms)=1656.106:2655.000:2765.000:10005.000
025.0: ok=81 err=0 iops=16.200 avg/p90/p95/p99(ms)=1984.807:2575.000:2645.000:10005.000
030.0: ok=99 err=0 iops=19.800 avg/p90/p95/p99(ms)=1784.382:2385.000:2505.000:10005.000
035.0: ok=151 err=0 iops=30.200 avg/p90/p95/p99(ms)=1157.328:1645.000:1805.000:2875.000
040.1: ok=149 err=0 iops=29.800 avg/p90/p95/p99(ms)=982.484:1785.000:1925.000:2005.000
045.1: ok=100 err=0 iops=20.000 avg/p90/p95/p99(ms)=1482.910:1865.000:2015.000:2125.000
050.1: ok=150 err=0 iops=30.000 avg/p90/p95/p99(ms)=1238.667:1785.000:1955.000:2125.000
055.1: ok=139 err=0 iops=27.800 avg/p90/p95/p99(ms)=989.736:1595.000:1785.000:1855.000
060.1: ok=185 err=0 iops=37.000 avg/p90/p95/p99(ms)=942.125:1555.000:1825.000:2085.000
065.1: ok=205 err=0 iops=41.000 avg/p90/p95/p99(ms)=759.879:1085.000:1365.000:1415.000
070.1: ok=141 err=0 iops=28.200 avg/p90/p95/p99(ms)=1167.708:1545.000:1625.000:1725.000
075.1: ok=197 err=0 iops=39.400 avg/p90/p95/p99(ms)=827.200:1095.000:1295.000:2255.000
080.1: ok=183 err=0 iops=36.600 avg/p90/p95/p99(ms)=880.266:1185.000:1305.000:2275.000
085.1: ok=175 err=0 iops=35.000 avg/p90/p95/p99(ms)=911.407:1355.000:1465.000:3905.000
090.1: ok=237 err=0 iops=47.400 avg/p90/p95/p99(ms)=696.760:1015.000:1195.000:1785.000
095.1: ok=168 err=0 iops=33.600 avg/p90/p95/p99(ms)=861.097:1155.000:1195.000:1645.000
100.1: ok=197 err=0 iops=39.400 avg/p90/p95/p99(ms)=874.611:1405.000:1445.000:1675.000
105.1: ok=153 err=0 iops=30.600 avg/p90/p95/p99(ms)=949.969:1335.000:1395.000:1585.000
110.2: ok=266 err=0 iops=53.200 avg/p90/p95/p99(ms)=674.147:1375.000:1695.000:4025.000
115.2: ok=188 err=0 iops=37.600 avg/p90/p95/p99(ms)=818.954:1265.000:1305.000:1445.000
120.2: ok=195 err=0 iops=39.000 avg/p90/p95/p99(ms)=819.473:1285.000:1455.000:2245.000
125.2: ok=243 err=0 iops=48.600 avg/p90/p95/p99(ms)=680.773:1015.000:1095.000:1325.000
130.2: ok=180 err=0 iops=36.000 avg/p90/p95/p99(ms)=871.310:1205.000:1315.000:1995.000
135.2: ok=192 err=0 iops=38.400 avg/p90/p95/p99(ms)=827.902:1025.000:1105.000:1835.000
140.2: ok=204 err=0 iops=40.800 avg/p90/p95/p99(ms)=778.571:1375.000:1635.000:2475.000
145.2: ok=189 err=0 iops=37.800 avg/p90/p95/p99(ms)=821.383:1485.000:1675.000:2555.000
150.2: ok=183 err=0 iops=36.600 avg/p90/p95/p99(ms)=922.094:1475.000:1725.000:3295.000
155.2: ok=246 err=0 iops=49.200 avg/p90/p95/p99(ms)=655.959:1135.000:1185.000:1285.000
160.2: ok=215 err=0 iops=43.000 avg/p90/p95/p99(ms)=720.828:965.000:1115.000:1905.000
165.2: ok=190 err=0 iops=38.000 avg/p90/p95/p99(ms)=874.728:1265.000:1535.000:2665.000
170.2: ok=200 err=0 iops=40.000 avg/p90/p95/p99(ms)=792.597:965.000:1115.000:1765.000
175.2: ok=163 err=0 iops=32.600 avg/p90/p95/p99(ms)=978.989:1395.000:1415.000:1485.000
180.2: ok=162 err=0 iops=32.400 avg/p90/p95/p99(ms)=952.605:1515.000:1565.000:2675.000
185.2: ok=219 err=0 iops=43.800 avg/p90/p95/p99(ms)=748.873:1545.000:1785.000:2275.000
190.3: ok=263 err=0 iops=52.600 avg/p90/p95/p99(ms)=616.106:1075.000:1185.000:1625.000
195.3: ok=291 err=0 iops=58.200 avg/p90/p95/p99(ms)=566.453:1085.000:1315.000:2145.000
200.3: ok=224 err=0 iops=44.800 avg/p90/p95/p99(ms)=716.010:965.000:1025.000:1435.000
205.3: ok=224 err=0 iops=44.800 avg/p90/p95/p99(ms)=681.103:985.000:1025.000:1315.000

I have just pushed the code for my new daemon to:

https://gitlab.freedesktop.org/benzea/uresourced

It should work once installed; I have not tested it yet beyond checking that it does work as expected. It also installs drop-ins which prepare a normal F32 GNOME session to run under the appropriate conditions.

There is a configuration file to adjust the limits. Note that these limits are propagated to session.slice and this requires a manual daemon-reload of the user systemd instance (or e.g. a reboot) after some changes to the configuration file.

Metadata Update from @catanzaro:
- Issue tagged with: meeting-request

a year ago

I experimented a bit (just setting memory.max on session.slice manually), a few notes:

  • doing a daemon-reload of the systemd user instance does not seem to be sufficient always … so be careful when testing
  • Pagefaults (as measured with perf trace -F) for gnome-shell started to drop considerably at around 300MiB and were getting pretty rare with 350MiB on a very simple session.

So, I that suggests we want a protection of >= 350MiB (Tejun says a protection of 50-75% of the expected memory need should be sufficient). Note that the daemon caps it at 10% of overall RAM so the protection will not be excessive on low-memory systems.

More testing will be needed of course.

Metadata Update from @chrismurphy:
- Issue untagged with: meeting-request
- Issue tagged with: meeting

a year ago

Benjamin gave us a status update at today's meeting. Sounds like this is on track for Fedora 34.

Metadata Update from @catanzaro:
- Issue untagged with: meeting

a year ago

Benjamin gave us a status update at today's meeting. Sounds like this is on track for Fedora 34.

To be clear, let's get it packaged for F33 anyway, so we can start testing it ourselves. Then for F34 we can install it by default and flip the service preset to enabled.

Submitted the new package for review:

https://bugzilla.redhat.com/show_bug.cgi?id=1854898

There is also already a copr repository for anyone wanting to try it early:

https://copr.fedorainfracloud.org/coprs/benzea/uresourced/

uresourced is packaged and installed by default. Future improvements can be tracked upstream or in separate issues.

This is great, thanks Benjamin!

Metadata Update from @catanzaro:
- Issue close_status updated to: Fixed
- Issue status updated to: Closed (was: Open)

a year ago

BTW using it since f32 and LGTM, it's better in terms of CPU at least in my tests, but still nice to have improvements in I/O area.

Yeah … there are some issues and the memory protection actually and it is not quite working. I'll upload fixes as 0 day update.

Two things basically 1. there is a systemd bug and I need to change something (the memory protection is ineffective due to this :-/) and 2. we should be setting memory.min.

Login to comment on this ticket.

Metadata