Ubuntu 22.04 CPU Performance

Always would see the following error mesage on the Power Settings

Performance mode temporarily disabled due to high operating temperature.

Refer: https://askubuntu.com/questions/1419396/how-to-force-enable-performance-mode-in-ubuntu-22-04

cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor

Enable with this program instead.

sudo apt update
sudo apt install cpupower-gui
cpupower-gui

Check to see what's the setting

cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor

High CPU Usage MacBook for md_stores

Refer: https://macmetric.com/fix-mds_stores-consuming-high-cpu-usage/

Spotlight is indexing things and it might be indexing an external drive too.

  • System Preferences
  • Spotlight
  • Privacy
  • Add Folders or drives you don't want indexed

 

How Debug JBoss 100% CPU Usage

Refer: 20120503 Debugging JBoss 100 Percent CPU Usage.pdf

There's a quick and dirty way of identifying which threads are using up the CPU time on JBoss. Go the the JMX Console with a browser (usually on http://localhost:8080/jmx-console, but may be different for you), look for a bean called ServerInfo, it has an operation called listThreadCpuUtilization which dumps the actual CPU time used by each active thread, in a nice tabular format. If there's one misbehaving, it usually stands out like a sore thumb.

There's also the listThreadDump operation which dumps the stack for every thread to the browser.

Not as good as a profiler, but a much easier way to get the basic information. For production servers, where it's often bad news to connect a profiler, it's very handy.