Процесс java грузит процессор

How to Fix OpenJDK Platform Binary High CPU on Windows 10/11? [MiniTool Tips]

If you regularly work with Java-based applications, you’ve probably heard of the OpenJDK platform binary. What is OpenJDK platform binary? How to fix the OpenJDK platform binary high CPU issue? This post from MiniTool introduces answers.

What is OpenJDK platform binary? It is the Java environment that the game runs in. Compiling and executing your classes using the OpenJDK platform is beneficial as it guarantees security and performance.

However, some players report that when they open Minecraft, they encounter the OpenJDK platform binary high CPU issue. The following is a user’s feedback:

Whenever I open games on PC similar to Pummel Party, Subnautica, or Cyberpunk2077 my fans run at 100% because the CPU is being used at 100% from the OpenJDK Platform Binary application. Games like League of Legends, Minecraft, and GTA V don’t cause such resource usage.

There are three reasons for the issue — outdated driver, issues with the game, and issues with integrated GPU.

8 Solutions - How to Fix Firefox High CPU Issue on Windows 10/11?

This post introduces 11 solutions for you to fix the “Firefox high CPU on Windows 10/11”. Besides, it will also provide reasons for the issue.

How to Fix OpenJDK Platform Binary High CPU Issue

Here are 3 solutions to fix the OpenJDK platform binary Minecraft high CPU issue.

Читайте также:  Php чем заменить массив

Solution 1: Update Your Graphics Driver

An outdated graphic drive can cause the OpenJDK platform binary high CPU. Thus, you can update your graphics driver to remove the issue.

Step 1: Right-click the Start menu to choose Device Management to open it.

Step 2: Right-click your graphics driver to choose Update driver.

update your graphics driver

Step 3: Then, you can choose Search automatically for drivers or Browse my computer for drivers.

After updating your graphics driver, you can check if the OpenJDK platform binary high CPU issue ha been fixed.

Solution 2: Disable Integrated Graphics from BIOS

You can also try to fix the OpenJDK platform binary high CPU issue by disabling Integrated Graphics from BIOS.

Step 1: Press the Win + I keys together to open Settings.

Step 2. Scroll down to click Update & Security.

Step 3. In the Recovery tab, click Restart now under Advanced startup and then your computer will enter the Windows recovery environment.

enter WinRE

Step 4. Press UEFI Firmware Settings to boot your PC into UEFI BIOS.

Step 5: Look for a setting with onboard, integrated video, VGA under Integrated Peripherals, Onboard Devices, or Built-in Devices.

Step 6: Change integrated graphics into disable or off by pressing Enter.

Step 7: According to the on-screen instructions, press the corresponding F-key to save your changes and click Y to confirm your action.

Solution 3: Perform a System Restore

If the above solutions are not working, you can try to perform a system restore to fix the “OpenJDK platform binary high CPU” issue. You need to notice that only if you have created system restore point, you can try this method. Follow the guide below to do that:

Step 1: In the start menu, search for create a recovery drive and open it. This will lead you to the system protection tab in the system properties.

Step 2: Then, click system restore. Now select the restore point to which you want to restore your system. Then, follow the on-screen instructions to finish the task.

There is another backup tool for you to perform the system restore — MiniTool ShadowMaker. It provides more features than the Windows built-in tool such as automatic backup, advanced backup options, etc. Download it now to have a try.

Tip: The free backup software — MiniTool ShadowMaker is an all-in-one data protection and disaster recovery solution for PCs. It allows you to back up your systems, important files, folders, partitions, and even the whole disk. Once a disaster occurs, you are able to restore data with a copy of the backup.

Final Words

That is all information about OpenJDK platform binary. You can know what it is and how to fix the OpenJDK platform binary high CPU issue. If you want to fix the issue, but don’t know how to do it, you can try the above solutions one by one.

About The Author

Daisy graduated with a major in English and then joined MiniTool as an editor. She specializes in writing articles about backing up data & systems, cloning disks, and syncing files, etc. She is also good at writing articles about computer knowledge and computer issues. In daily life, she likes running and going to the amusement park with friends to play some exciting items.

Источник

Какой Java поток нагружает мой процессор

Что Вы делаете, когда Ваше Java приложение потребляет 100% ЦП? Оказывается Вы легко можете найти проблемные потоки, используя встроенные Unix и JDK утилиты. Никакие инструменты профилирования не потребуются.
С целью тестирования мы будем использовать простую программу:

public class Main < public static void main(String[] args) < new Thread(new Idle(), "Idle").start(); new Thread(new Busy(), "Busy").start(); >> class Idle implements Runnable < @Override public void run() < try < TimeUnit.HOURS.sleep(1); >catch (InterruptedException e) < >> > class Busy implements Runnable < @Override public void run() < while(true) < "Foo".matches("F.*"); >> > 

Как вы видите, в данном куске кода запускается 2 потока. Idle не потребляет ресурсы ЦП(
запомните, спящие потоки потребляют память, но не процессор), в то время как Busy сильно нагружает ЦП, выполняя парсинг регулярных выражений, и другие сложные процессы.
Как мы можем быстро найти проблемный кусок кода нашей программы? Во-первых мы будем использовать ‘top’, чтобы найти Id процесса(PID) java приложения. Это весьма просто:

22614 tomek 20 0 1360m 734m 31m S 6 24.3 7:36.59 java 

Первая колонка это PID. К сожалению, оказалось, что ‘top’ использует ANSI escape codes for colors. К счастью, я нашел perl скрипт, чтобы удалить лишние символы и наконец-то извлечь PID.

top -n1 | grep -m1 java | perl -pe 's/\e\[?.*?[\@-~] ?//g' | cut -f1 -d' ' 

Теперь, когда мы знаем PID процесса, мы можем использовать top -H, для поиска проблемных Linux потоков. Ключ -H отображает список всех потоков, и теперь колонка PID это ID потока:

top -n1 -H | grep -m1 java top -n1 -H | grep -m1 java | perl -pe 's/\e\[?.*?[\@-~] ?//g' | cut -f1 -d' ' 
25938 tomek 20 0 1360m 748m 31m S 2 24.8 0:15.15 java 25938 

Итого мы имеем ID процесса JVM и ID потока Linux. А теперь самое интересное: если вы посмотрите на вывод jstack (доступен в JDK), каждый поток имеет NID, который написан после имени.

Busy' prio=10 tid=0x7f3bf800 nid=0x6552 runnable [0x7f25c000] java.lang.Thread.State: RUNNABLE at java.util.regex.Pattern$Node.study(Pattern.java:3010) 
#!/bin/bash PID=$(top -n1 | grep -m1 java | perl -pe 's/\e\[?.*?[\@-~] ?//g' | cut -f1 -d' ') NID=$(printf '%x' $(top -n1 -H | grep -m1 java | perl -pe 's/\e\[?.*?[\@-~] ?//g' | cut -f1 -d' ')) jstack $PID | grep -A500 $NID | grep -m1 '^$' -B 500 

Последняя строка запускает jstack с определённым PID и выводит поток с совпадающим NID. Тот самый поток и будет являться проблемным.
Выполняем:

./profile.sh "Busy" prio=10 tid=0x7f3bf800 nid=0x6552 runnable [0x7f25c000] java.lang.Thread.State: RUNNABLE at java.util.regex.Pattern$Node.study(Pattern.java:3010) at java.util.regex.Pattern$Curly.study(Pattern.java:3854) at java.util.regex.Pattern$CharProperty.study(Pattern.java:3355) at java.util.regex.Pattern$Start.(Pattern.java:3044) at java.util.regex.Pattern.compile(Pattern.java:1480) at java.util.regex.Pattern.(Pattern.java:1133) at java.util.regex.Pattern.compile(Pattern.java:823) at java.util.regex.Pattern.matches(Pattern.java:928) at java.lang.String.matches(String.java:2090) at com.blogspot.nurkiewicz.Busy.run(Main.java:27) at java.lang.Thread.run(Thread.java:662) 

Источник

Оцените статью