0

the current available cpus can´t afford the single thread performance I need. So, I would like to know if there a ways to improve the single thread performance via. the software ? I have a java application that would need 160% cpu power at the moment. Do you know anything which could improve the cpu usage for the java application ? I would be so glad if you could give me a few keywords which may boost it a few percentage.

user2693017
  • 1,750
  • 6
  • 24
  • 50

2 Answers2

0

a single thread program cannot use cpu for over 100% , so 160% means at least you are using two threads. to improve the perf of a single thread, you should pay attention to the logic, include, algorithm memory allocation / release depth of call stack

but assume you are using at least two threads, you also need to pay attention to the lock

Hzj_jie
  • 21
  • 1
0

You can improve the performance of single threaded programs (or multi threaded programs) by using CPU and Memory profiling to identify code which needs to optimised and improving it.

As you are using over 100% of CPU, this could be due to the garbage collector running a significant portion of the time (as it is multi-threaded) By reducing the amount of garbage you produce you can significantly improve the performance both in terms of throughput and consistency.

Peter Lawrey
  • 525,659
  • 79
  • 751
  • 1,130