LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 05-21-2015, 08:06 AM   #1
techux
Member
 
Registered: Mar 2013
Posts: 56

Rep: Reputation: Disabled
Applications and cores


Hi all.

I have a doubt.. when you have a server with multi CPU and cores. does the OS assign them or is the application who should be able to use them?

I have a red hat server with several cpu/cores and oracle seems to be using 1 core.. instead of using all of them..

not sure if it is something that have to be change on the OS or in the oracle DB application.

any idea where should I start looking at?


Edit:
when I run top. and press 1 I see all the cores, some few has a of use but looks like randomly there is always 1 in 100% or maybe 2 in 49% and 50%..

then on the process list there is oracle always in 100% or 99%..while the overall id% is 94%...

I would like to verify is the application or CPUs core are being used properly.
thanks

Last edited by techux; 05-21-2015 at 08:30 AM.
 
Old 05-21-2015, 08:26 AM   #2
johnsfine
LQ Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,286

Rep: Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197
First the application may or may not be divided into multiple threads. Many applications are not divided into multiple threads. It is trickier to code an application for multiple threads than for single thread. If the application is single thread, there is nothing the OS can do to make the application get better use of multiple cores.

I don't use any Oracle DB, so I find it surprising that a limit to single thread would exist in that application. But I don't really know.

If the application is multi-threaded and the application does not go to significant extra effort to mange/limit its use of physical cores, then it is the OS that assigns threads to cores. But for purposes of your question, I find it highly unlikely that some OS flaw or weird setting is responsible for the unexpected behavior you report.

Last edited by johnsfine; 05-21-2015 at 08:28 AM.
 
Old 05-21-2015, 08:34 AM   #3
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,119

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
Agreed - locking is another consideration.
Merely making an application multi-threaded doesn't make it is thread safe. But you've have to think Oracle has all that sorted out by now - sounds like a (user) config issue.
 
Old 05-21-2015, 10:23 AM   #4
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,791

Rep: Reputation: 7304Reputation: 7304Reputation: 7304Reputation: 7304Reputation: 7304Reputation: 7304Reputation: 7304Reputation: 7304Reputation: 7304Reputation: 7304Reputation: 7304
Yes, if I remember well that is only a configuration issue (of oracle db server). But probably it has changed since then.
 
Old 05-21-2015, 10:57 AM   #5
techux
Member
 
Registered: Mar 2013
Posts: 56

Original Poster
Rep: Reputation: Disabled
Well, I have been playing with ps- eLF, htop, etc...

I see activity on all of the cores.. only one process is using one core at the time 100...it could be any core from 1 to 16 ....

there are SEVERAL Oracle processes running across different cores.. so looks like from a OS perspective is fine and there is not a limitation.. even in oracle seems to be recognizing mutliple cores..

the problem is with ONE particular process.

I'm not a DBA, not have access to the oracle DB. so I would check with the DBA to see if they know something..

looks like oracle have something called "Parallel SQL Execution".. will continue reading about it too..
 
Old 05-22-2015, 05:02 AM   #6
veerain
Senior Member
 
Registered: Mar 2005
Location: Earth bound to Helios
Distribution: Custom
Posts: 2,524

Rep: Reputation: 319Reputation: 319Reputation: 319Reputation: 319
If linux kernel feature process affinity is set to use one core for all threads of single app then it may do like this.
 
Old 05-26-2015, 01:26 PM   #7
Soadyheid
Senior Member
 
Registered: Aug 2010
Location: Near Edinburgh, Scotland
Distribution: Cinnamon Mint 20.1 (Laptop) and 20.2 (Desktop)
Posts: 1,672

Rep: Reputation: 486Reputation: 486Reputation: 486Reputation: 486Reputation: 486
This isn't a licensing thing is it? Some Software and hardware vendors can charge a licence fee per core so you only get what you pay for. I know that IBM and HP do this for some of their higher end products (usually not X86 based CPUs) Does Oracle charge a fee to allow scaling of its software in a similar way?

Just a thought...

Play Bonny!

 
Old 05-27-2015, 05:57 PM   #8
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,636
Blog Entries: 4

Rep: Reputation: 3933Reputation: 3933Reputation: 3933Reputation: 3933Reputation: 3933Reputation: 3933Reputation: 3933Reputation: 3933Reputation: 3933Reputation: 3933Reputation: 3933
A single application (process) will run on only one core at a time, unless it is a multi-threaded process.

However, you should ordinarily observe that process being dispatched at-random among the various available cores . . .
 
  


Reply


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Cores and Threads CrazyCatLover Linux - General 15 11-21-2014 07:24 PM
AMD Cores/Threads/Virtual Cores dman777 Linux - Hardware 2 05-07-2013 02:04 AM
How to config how many cores used? duyuyang Linux - Kernel 3 06-18-2009 03:04 AM
No of cores in Xeon linuxbeginner0 Linux - Hardware 7 01-23-2008 08:42 AM
cores vs. clockspeed jhwilliams Linux - Hardware 26 10-21-2007 09:35 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 06:40 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