0

On Linux/x86_64 I have several Db2 database instances and most of them have one database per instance.

Today I have had one "run away instance" that consumed most of the CPU resources of whole hardware server.

Is there any simple way to limit CPU resources by Db2 instance. Like setting max 20% CPU usage per instance?

Regards

asked Oct 10, 2022 at 6:54

1 Answer 1

1

If you enable the WLM Dispatcher for each Db2 instance, you can set WLM_CPU_LIMIT for each database to limit how much of the system’s CPU resources each database can consume. This works across instances, so you could limit DB1 in Instance1 to 50% and DB2 in Instance2 to 50% of the system’s CPU resources.

However, be careful when doing this. WLM_CPU_LIMIT is a hard limit, so even if there’s no other work going on in other databases or instances, you may be slowing down the work in that one database by preventing it from consuming more CPU resources.

answered Oct 10, 2022 at 19:35
3
  • I have set: update dbm cfg using wlm_dispatcher yes and update db cfg for test1 using wlm_cpu_limit 20 and then run some aggressive SQL and CPU gets more then 50% consumption. It looks like it does not work to limit to 20%. WLM DBM settigs: WLM_DISPATCHER=YES WLM_DISP_CONCUR=COMPUTED WLM_DISP_CPU_SHARES=NO WLM_DISP_MIN_UTIL=5 WLM DB settings: WLM_COLLECT_INT=0 WLM_AGENT_LOAD_TRGT=AUTOMATIC(11) WLM_ADMISSION_CTRL=NO WLM_CPU_SHARES=1000 WLM_CPU_SHARE_MODE=HARD WLM_CPU_LIMIT=20 Commented Oct 11, 2022 at 7:56
  • Did you restart the instance after setting wlm_dispatcher - it can’t be set dynamically. You can set wlm_cpu_limit dynamically, but the syntax you used won’t do that. Commented Oct 11, 2022 at 22:18
  • Yes, I have restarted the Db2 instance. I check CPU consumption in top Linux command and press I letter to get total percentage for all of the CPU cores. Commented Oct 12, 2022 at 9:40

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.