Skip to Main Content

Database Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

SQL loader load data very slow...

Harsh_vJun 1 2012 — edited Jul 16 2012
Hi,

On my production server have issue of insert. Regular SQL loder load file, it take more time for insert the data in database.
First 2 and 3 hours one file take 8 to 10 seconds after that it take 5 minutes.

As per my understanding OS I/O is very slow, First 3 hours DB buffer is free and insert data in buffer normal.
But when buffer is fill then going for buffer waits and then insert is slow on. If it rite please tell me how to increase I/O.


Some analysis share here of My server...................

[root@myserver ~]# iostat
Linux 2.6.18-194.el5 (myserver) 06/01/2012

avg-cpu: %user %nice %system %iowait %steal %idle
3.34 0.00 0.83 6.66 0.00 89.17

Device: tps Blk_read/s Blk_wrtn/s Blk_read Blk_wrtn
sda 107.56 2544.64 3140.34 8084953177 9977627424
sda1 0.00 0.65 0.00 2074066 16
sda2 21.57 220.59 1833.98 700856482 5827014296
sda3 0.00 0.00 0.00 12787 5960
sda4 0.00 0.00 0.00 8 0
sda5 0.69 2.75 15.07 8739194 47874000
sda6 0.05 0.00 0.55 5322 1736264
sda7 0.00 0.00 0.00 2915 16
sda8 0.50 9.03 5.24 28695700 16642584
sda9 0.51 0.36 24.81 1128290 78829224
sda10 0.52 0.00 5.98 9965 19004088
sda11 83.71 2311.26 1254.71 7343426336 3986520976

[root@myserver ~]# hdparm -tT /dev/sda11

/dev/sda11:
Timing cached reads: 10708 MB in 2.00 seconds = 5359.23 MB/sec
Timing buffered disk reads: 540 MB in 3.00 seconds = 179.89 MB/sec
[root@myserver ~]# sar -u -o datafile 1 6
Linux 2.6.18-194.el5 (mca-webreporting2) 06/01/2012

09:57:19 AM CPU %user %nice %system %iowait %steal %idle
09:57:20 AM all 6.97 0.00 1.87 16.31 0.00 74.84
09:57:21 AM all 6.74 0.00 1.25 17.48 0.00 74.53
09:57:22 AM all 7.01 0.00 1.75 16.27 0.00 74.97
09:57:23 AM all 6.75 0.00 1.12 13.88 0.00 78.25
09:57:24 AM all 6.98 0.00 1.37 16.83 0.00 74.81
09:57:25 AM all 6.49 0.00 1.25 14.61 0.00 77.65
Average: all 6.82 0.00 1.44 15.90 0.00 75.84
[root@myserver ~]# sar -u -o datafile 1 6
Linux 2.6.18-194.el5 (mca-webreporting2) 06/01/2012

09:57:19 AM CPU %user %nice %system %iowait %steal %idle

mca-webreporting2;601;2012-05-27 16:30:01 UTC;2.54;1510.94;3581.85;0.00
mca-webreporting2;600;2012-05-27 16:40:01 UTC;2.45;1442.78;3883.47;0.04
mca-webreporting2;599;2012-05-27 16:50:01 UTC;2.44;1466.72;3893.10;0.04
mca-webreporting2;600;2012-05-27 17:00:01 UTC;2.30;1394.43;3546.26;0.00
mca-webreporting2;600;2012-05-27 17:10:01 UTC;3.15;1529.72;3978.27;0.04
mca-webreporting2;601;2012-05-27 17:20:01 UTC;9.83;1268.76;3823.63;0.04
mca-webreporting2;600;2012-05-27 17:30:01 UTC;32.71;1277.93;3495.32;0.00
mca-webreporting2;600;2012-05-27 17:40:01 UTC;1.96;1213.10;3845.75;0.04
mca-webreporting2;600;2012-05-27 17:50:01 UTC;1.89;1247.98;3834.94;0.04
mca-webreporting2;600;2012-05-27 18:00:01 UTC;2.24;1184.72;3486.10;0.00
mca-webreporting2;600;2012-05-27 18:10:01 UTC;18.68;1320.73;4088.14;0.18
mca-webreporting2;600;2012-05-27 18:20:01 UTC;1.82;1137.28;3784.99;0.04
[root@myserver ~]# vmstat
procs -----------memory---------- -swap -----io---- system -----cpu------
r b swpd free buff cache si so bi bo in cs us sy id wa st
0 1 182356 499444 135348 13801492 0 0 3488 247 0 0 5 2 89 4 0

[root@myserver ~]# dstat -D sda
----total-cpu-usage---- dsk/sda -net/total- -paging -system
usr sys idl wai hiq siq| read writ| recv send| in out | int csw
3 1 89 7 0 0|1240k 1544k| 0 0 | 1.9B 1B|2905 6646
8 1 77 14 0 1|4096B 3616k| 433k 2828B| 0 0 |3347 16k
10 2 77 12 0 0| 0 1520k| 466k 1332B| 0 0 |3064 15k
8 2 77 12 0 0| 0 2060k| 395k 1458B| 0 0 |3093 14k
8 1 78 12 0 0| 0 1688k| 428k 1460B| 0 0 |3260 15k
8 1 78 12 0 0| 0 1712k| 461k 1822B| 0 0 |3390 15k
7 1 78 13 0 0|4096B 6372k| 449k 1950B| 0 0 |3322 15k
AWR sheet output
Wait Events
ordered by wait time desc, waits desc (idle events last)

Event Waits %Time -outs Total Wait Time (s) Avg wait (ms) Waits /txn
free buffer waits 1,591,125 99.95 19,814 12 129.53
log file parallel write 31,668 0.00 1,413 45 2.58
buffer busy waits 846 77.07 653 772 0.07
control file parallel write 10,166 0.00 636 63 0.83
log file sync 11,301 0.00 565 50 0.92
write complete waits 218 94.95 208 955 0.02

SQL> select 'free in buffer (NOT_DIRTY)',round((( select count(DIRTY) N_D from v$bh where DIRTY='N')*100)/(select count(*) from v$bh),2)||'%' DIRTY_PERCENT from dual
union
2 3 select 'keep in buffer (YES_DIRTY)',round((( select count(DIRTY) N_D from v$bh where DIRTY='Y')*100)/(select count(*) from v$bh),2)||'%' DIRTY_PERCENT from dual;
'FREEINBUFFER(NOT_DIRTY)' DIRTY_PERCENT
-----------------------------------------
free in buffer (NOT_DIRTY) 10.71%
keep in buffer (YES_DIRTY) 89.29%

Rag....
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 13 2012
Added on Jun 1 2012
14 comments
4,891 views