LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
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 04-16-2011, 08:16 AM   #1
Ammad
Member
 
Registered: Apr 2004
Distribution: redhat 9.0, fc4, redhat as 4
Posts: 522

Rep: Reputation: 31
SMP and CPU utilization


Hi,

I am using OEL 5.3 64-bit on HP DL580 (4 CPU). i am decompressing the Oracle backup by tar command.

only one core is being utilized 65% and rest of the cores are free and load average is 4.4.

I want to know why the CPU is not being equally utilized?
Attached Thumbnails
Click image for larger version

Name:	CPU-utilizatiion.jpg
Views:	16
Size:	109.8 KB
ID:	6714  
 
Click here to see the post LQ members have rated as the most helpful post in this thread.
Old 04-16-2011, 08:39 AM   #2
johnsfine
LQ Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,286

Rep: Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197
Quote:
Originally Posted by Ammad View Post
I am using OEL 5.3 64-bit on HP DL580 (4 CPU). i am decompressing the Oracle backup by tar command.
You have 30GB of files in cache, but apparently the tar file you are reading was not in that cache. That seems reasonable to me. But if it doesn't match your expectation, explain.

Quote:
only one core is being utilized 65%
Probably that means the limit on throughput is reading that tar file from disk. So one core at 65% is enough to decompress at the rate the input file can be read.

Maybe the operation you are doing is so big, that the write behind of its output is aging out of cache enough that the actual limit on throughput is writing the output to disk. More likely, the output is filling your 30GB of cache, while the disk is busy reading the input.

Either way, the limit is the disk.

Quote:
and rest of the cores are free and load average is 4.4.

I want to know why the CPU is not being equally utilized?
Why should the work be balanced among cores?

Even if there were more work than one core could handle (if you had some faster RAID instead of your current disk system), I don't think the decompression algorithm has been coded to make good use of multiple cores.

My experience with Windows on single threaded applications on multi core machines is that on almost every I/O stall the OS switches the thread to a different core. That reduces throughput because of L1 (and maybe L2) cache effects. That balances the temperature across the cores, which might be beneficial (I don't really know).

My experience with similar situations on Linux is that threads do not move among cores as often. So compared to Windows, you get slightly better throughput and worse thermal balance.

I don't know enough to say which is better.

Were you worried about thermal balance? Or did you misunderstand the fact that disk speed limits this operation and think better balance across cores could give better throughput?

Last edited by johnsfine; 04-16-2011 at 08:44 AM.
 
Old 04-16-2011, 08:52 AM   #3
Ammad
Member
 
Registered: Apr 2004
Distribution: redhat 9.0, fc4, redhat as 4
Posts: 522

Original Poster
Rep: Reputation: 31
hi,

only one process is running is (tar gz), no other process (Database )is running. there are 8 spindales (10K) so the throughput should not be the problem on disk side

Code:

[root@proddb u01]# iostat
Linux 2.6.18-128.el5xen (proddb)  04/16/2011

avg-cpu:  %user   %nice %system %iowait  %steal   %idle
           0.56    0.00    0.06    0.42    0.00   98.96

Device:            tps   Blk_read/s   Blk_wrtn/s   Blk_read   Blk_wrtn
cciss/c0d0       16.52      1319.16      1167.85  429486065  380223574
cciss/c0d0p1      0.00         0.14         0.00      44825        105
cciss/c0d0p2      0.00         0.01         0.00       3735        624
cciss/c0d0p3      1.81        46.20        36.01   15041338   11722552
cciss/c0d0p4      0.00         0.00         0.00          6          0
cciss/c0d0p5      0.41         2.95         6.50     960560    2116012
cciss/c0d0p6     14.30      1269.86      1125.35  413435177  366384281
sda               1.46        29.76        17.22    9689446    5605762
sda1              1.46        29.76        17.22    9687654    5605762
sdb               0.00         0.01         0.00       4728          0
sdc               0.00         0.00         0.00       1104          0
sdd               0.00         0.00         0.00       1104          0
any idea about this
 
Old 04-16-2011, 10:48 AM   #4
johnsfine
LQ Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,286

Rep: Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197
Quote:
Originally Posted by Ammad View Post
there are 8 spindales (10K) so the throughput should not be the problem on disk side
Yet each stat you post confirms that the disk is the limit on throughput.
 
1 members found this post helpful.
Old 04-16-2011, 11:42 AM   #5
MTK358
LQ 5k Club
 
Registered: Sep 2009
Posts: 6,443
Blog Entries: 3

Rep: Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723
One process with one thread uses one CPU core. It cannot somehow be balanced, and it doesn't matter anyway (for example, if you have a quad core CPU, whether a process is using 100% of one core or 25% of all 4 cores, it's still the same load).

Last edited by MTK358; 04-16-2011 at 11:44 AM.
 
2 members found this post helpful.
Old 04-17-2011, 03:57 PM   #6
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,980

Rep: Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624
I say the bottle neck is not the cpu at all but the tape or disk access speeds. Use some cpu intensive task to check cpu not tar.

Since you are decompressing then other tasks may be used. Dunno what compression scheme they are using but it could be single thread. Convert to a modern compression that supports smp.
 
Old 04-19-2011, 01:06 AM   #7
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,359

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
In terms of speed,

cpu > RAM >> disk

where >> = much greater.

However, if the tool is single threaded (and it prob is in this case) then it can only use one cpu/core. The rest of the OS etc can have the other core(s).
If the tool pauses for any reason eg disk can't keep up, then it may get moved out of the core briefly and may get moved back in on another core or the same one.
It all depends on the scheduling algorithm.
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
High CPU utilization on only one CPU out of 4 CPUs makam.sreekanth Linux - Kernel 2 09-03-2009 04:12 AM
cpu utilization and cpu load soltanloo Linux - General 1 06-07-2009 02:19 AM
pthread_mutex_lock/unlock SMP and CPU cache coherence on core2 SMP sergxm Linux - Kernel 0 01-27-2009 04:32 PM
Linux desktop GUI tool for CPU utilization and bandwidth utilization karimasif Linux - Software 4 03-03-2008 01:09 PM
Unbalanced SMP utilization as a router circusbug Linux - Networking 0 06-01-2005 02:00 AM

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

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