LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-25-2014, 02:45 AM   #1
dinodesilva
LQ Newbie
 
Registered: Jun 2014
Location: Earth
Distribution: Debian Stable & Testing
Posts: 19

Rep: Reputation: Disabled
Question Java and CPU usage


Hi everybody,


I use a certain java application to trade the stock market and it consumes 90% my CPU power. And the CPU temp usually remains around 90c. This is a real headache. What causes this problem and what are the possible solutions?

Thank you.
 
Old 09-28-2014, 06:04 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,331
Blog Entries: 55

Rep: Reputation: 3531Reputation: 3531Reputation: 3531Reputation: 3531Reputation: 3531Reputation: 3531Reputation: 3531Reputation: 3531Reputation: 3531Reputation: 3531Reputation: 3531
Quote:
Originally Posted by dinodesilva View Post
What causes this problem and what are the possible solutions?
Generally speaking any application (that is either coded badly or just does anything computationally expensive) will just try to consume the resources it needs (doh). Simply put: the more system resources you have available the better. If you've coded the Java application yourself you may already be aware of some of the profiling / monitoring tools in the List of performance analysis tools else if you haven't get in touch with the developers. They may be able to tell you what information they need to assess if they can improve things.
 
Old 09-28-2014, 06:05 AM   #3
dijetlo
Senior Member
 
Registered: Jan 2009
Location: RHELtopia....
Distribution: Solaris 11.2/Slackware/RHEL/
Posts: 1,307
Blog Entries: 2

Rep: Reputation: Disabled
Quote:
What causes this problem
Could be a number of different things, from the app is poorly written to the app was never designed to run with the current version of Java you're rolling.
Quote:
and what are the possible solutions?
Step 1 is find if this app has a log file, if it does, check it.

Step 2 is profile the thing while it's running.A command line system call, like "ps aux" while it's running, gives you something like this (I substituted pulseaudio on my machine for the app you're talking about on yours for this example).
Quote:
[root@kahuna Downloads]# ps aux | grep pulseaudio
willie 2608 0.0 0.1 602536 4184 ? S<sl Sep25 2:13 /usr/bin/pulseaudio --start --log-target=syslog
Jojo 11814 0.1 0.1 602452 4136 ? S<sl Sep25 4:47 /usr/bin/pulseaudio --start --log-target=syslog
gdm 22368 0.0 0.0 579384 2936 ? S<sl Sep26 0:00 /usr/bin/pulseaudio --start --log-target=syslog
Step 3: Call the app using redirection for error messages. something like " myapp 2>> adhoc-myapp.log" and see what it complains about as it's starting up and running.

Step 4 Read the documentation that came with the product. It's has a specific Java requirement, for example. Are you meeting that requirement? Are you using a version of Java several versions past the requirement? Are their any other requirements you're not meeting?
 
Old 10-04-2014, 04:24 AM   #4
dinodesilva
LQ Newbie
 
Registered: Jun 2014
Location: Earth
Distribution: Debian Stable & Testing
Posts: 19

Original Poster
Rep: Reputation: Disabled
Thank you, unSpawn and dijetlo, taking the time to help me out. I use the latest Java, but the app keeps consuming enormous amount of resources. I contacted the vendor and waiting for a reply. Thanks again for your time.
 
Old 10-04-2014, 03:36 PM   #5
jefro
Moderator
 
Registered: Mar 2008
Posts: 15,408

Rep: Reputation: 2207Reputation: 2207Reputation: 2207Reputation: 2207Reputation: 2207Reputation: 2207Reputation: 2207Reputation: 2207Reputation: 2207Reputation: 2207Reputation: 2207
The write once, run everywhere concept of Java is a trade off. It does consume some power but we haven't yet proven what is running and what is consuming cpu or even if your metric is correct.

What does command top say?

Can it be that network calculation for md5 are burning up your cpu?

What is the quality of the host system?
 
  


Reply

Tags
cpu, java


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Squid 3 near 100% cpu usage and high RAM usage piman Linux - Software 1 11-16-2013 03:20 AM
Not able to kill java process with average 90% cpu usage Squall90 Slackware 13 05-12-2010 04:02 PM
processes/CPU Usage/Mem Usage desktop wallpaper ceantuco Linux - Newbie 2 04-13-2009 02:14 PM
getting realtime info on memory usage-cpu and harddrive usage steering Linux - Newbie 5 03-03-2005 09:43 PM
how to determine cpu usage, memory usage, I/O usage by a particular user logged on li rags2k Programming 4 08-21-2004 05:45 AM


All times are GMT -5. The time now is 08:44 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration