LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 08-10-2016, 06:09 AM   #1
sandeep002gupta
Member
 
Registered: Apr 2011
Posts: 96
Blog Entries: 1

Rep: Reputation: 0
CPU is not evenly distributed when application runs


Hi,
we are running JAVA/Tomcat application one of server & its consumed 100% cpu utilization. while on server have 4 CPU but its consumed only one CPU at a time & other 3 CPU utilization is showing like 0%.

Please suggest why process is not divided in to all cpus.

here I have attached screenshot for reference.
Attached Thumbnails
Click image for larger version

Name:	cpu.jpg
Views:	23
Size:	114.7 KB
ID:	22704  
 
Old 08-10-2016, 07:28 AM   #2
TenTenths
Senior Member
 
Registered: Aug 2011
Location: Dublin
Distribution: Centos 5 / 6 / 7
Posts: 3,475

Rep: Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553
If your application is running as a single thread then it'll only use a single CPU.

An application has to be multi-processor/thread aware and written to take advantage of this otherwise it can max out a single CPU.
 
Old 08-10-2016, 07:33 AM   #3
sandeep002gupta
Member
 
Registered: Apr 2011
Posts: 96

Original Poster
Blog Entries: 1

Rep: Reputation: 0
Thanks, have any process to check application run by single threads.
 
Old 08-19-2016, 02:12 PM   #4
ReinaldoGomes
LQ Newbie
 
Registered: Jul 2016
Posts: 15

Rep: Reputation: Disabled
Should this be feasible for your scenario, you could also run multiple instances of the same application, so that each would be handled by one process and use multiple cpus.
 
Old 08-22-2016, 12:47 AM   #5
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,657
Blog Entries: 4

Rep: Reputation: 3938Reputation: 3938Reputation: 3938Reputation: 3938Reputation: 3938Reputation: 3938Reputation: 3938Reputation: 3938Reputation: 3938Reputation: 3938Reputation: 3938
Remember that your Java application is actually being run ... as far as the operating-system is concerned ... by a Java Virtual Machine (JVM) process. There is only one such process-instance responsible for all of the activities of this application-instance, and this process will therefore run on only one CPU/Core at a time. You observe that only one is being used, and you coincidentally observe that the same core-ID is being repeatedly picked.

Last edited by sundialsvcs; 08-22-2016 at 12:49 AM.
 
Old 08-23-2016, 04:49 AM   #6
sandeep002gupta
Member
 
Registered: Apr 2011
Posts: 96

Original Poster
Blog Entries: 1

Rep: Reputation: 0
Thanks guys...
 
  


Reply



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
[SOLVED] Ubuntu runs at 50-60% CPU philg1943 Linux - Newbie 6 07-16-2010 12:52 PM
distributed Linux Application Programs JimHughen Linux - General 4 06-29-2009 11:35 PM
application runs under 10.1 but not 10.2 nicolas765 SUSE / openSUSE 0 02-15-2007 12:19 PM
ls runs up cpu chris101 Debian 2 11-23-2005 12:11 PM
Writing a CPU Consume Program to Test a Distributed System russelh Programming 4 11-30-2004 02:27 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 05:44 AM.

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
Open Source Consulting | Domain Registration