The cupsd process in RHEL 8 and RHEL 9 consumes too much memory
Issue
-
The
topcommand showscupsdusing a lot of memory:PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 1299 root 20 0 26.8g 23.4g 9804 S 0.3 92.7 136:47.28 cupsdrestarting CUPS resolves the issue for a while.
-
After processing ~3600 print jobs
cupsdconsumed over 200 MiB:top - 16:18:59 up 4:17, 2 users, load average: 3.07, 3.33, 3.29 Tasks: 1 total, 0 running, 1 sleeping, 0 stopped, 0 zombie %Cpu(s): 0.0 us, 0.0 sy, 0.0 ni,100.0 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st MiB Mem : 1308.7 total, 67.9 free, 355.4 used, 885.3 buff/cache MiB Swap: 0.0 total, 0.0 free, 0.0 used. 698.5 avail Mem PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 21129 root 20 0 349500 216660 9596 S 0.0 16.2 23:04.51 cupsd -
Today,
cupsdtakes 608.47 Mb which is more than yesterday (12.51 Mb):ps -eo size,pid,user,command --sort -size | awk '{ hr=$1/1024 ; printf("%13.2f Mb ",hr) } { for ( x=4 ; x<=NF ; x++ ) { printf("%s ",$x) } print "" }' | grep cupsd 608.47 Mb /usr/sbin/cupsd -l
Environment
- Red Hat Enterprise Linux (RHEL) 8 & 9
- Common Unix Printing System (CUPS) 2.3.3op2-16.el9 & 2.2.6-51.el8
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.