Question

Oracle9i not using main memory

Asked by: fargo

Hello All,

I have the following scenario:
Oracle 9i is installed in machine with 2 AMD processors (1.3GHz each). 2GB RAM. Linux OS. 200 GB Hard Disk.

Oracle is running but is NOT using the main memory. When we do bulk load or any db operation oracle prefers
not to use the main memory but the read/write operations are very slow. Oracle is damn slow.

Why? Why oracle doesn't use the main memory?

Regards,
fargo

This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.

Subscribe now for full access to Experts Exchange and get

Instant Access to this Solution

  • Plus...
  • 30 Day FREE access, no risk, no obligation
  • Collaborate with the world's top tech experts
  • Unlimited access to our exclusive solution database
  • Never be left without tech help again

Subscribe Now

Asked On
2006-04-03 at 02:51:59ID21799106
Tags

oracle

,

db_buffer_cache

,

9i

Topic

Oracle Database

Participating Experts
4
Points
500
Comments
29

Trusted by hundreds of thousands everyday for fast, accurate and reliable tech support.

  • "The time we save is the biggest benefit of Experts Exchange to Warner Bros. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange." Mike Kapnisakis, Warner Bros.
  • "Our team likes having a resource that is more secure than just using Google and most experts using this service really know their stuff. It's nice to look here first versus using Google." Dayna Sellner, Lockheed Martin
  • "Anytime that I've been stumped with a problem, 9 out of 10 times Experts Exchange has either the accepted solution or an open discussion of the potential solution to the problem." Kenny Red, eBay Inc.

See what Experts Exchange can do for you.

Got a question?

We've got the answer.

Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.

Screenshot of Experts Exchange Knowledgebase

Need individual assistance?

Our experts are ready to help.

If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.

Screenshot of Experts Exchange Knowledgebase

Want to learn from the best?

Read articles from industry experts.

Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.

Screenshot of an Article

Working on a long term project?

Store your work and research.

Save solutions to your questions, answers you’ve discovered through searching plus helpful articles in your personal knowledgebase for easy future access.

Screenshot of Experts Exchange Knowledgebase

Access the answers to your technology questions today.

Subscribe Now

30-day free trial. Register in 60 seconds.

What Makes Experts Exchange Unique?

Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Trusted by the world's most respected brands.

image of each brand's logo

Faithfully serving IT professionals since 1996.

Experts Exchange Logo

Try it out and discover for yourself.

Subscribe Now

30-day free trial. Register in 60 seconds.

Related Solutions

  1. ORA-604 in Oracle9i
    Did anybody experience the following error messages in Oracle9i? SMON: following errors trapped and ignored: ORA-00604: error occurred at recursive SQL level 1 ORA-01001: invalid cursor ORA-00601: cleanup lock conflict The trace files do not show any helpful information.
  2. Oracle9i Configuration
    I have installed Oracle9i Database and Oracle IDS in my system. I want to work on PSP. I have created a Database Access Descriptor. I have run OWS toolkit in SYS. I created a schema. I have created a procedure. When i am running through the browser I get a message the server ...
  3. Bulk insert-oracle database
    Hello Experts, Can some one tell me the best way to bulk insert records in to an oracle database in C#. Thank you!
  4. XML generation with Oracle9i
    Hi guys: I am converting relational data into XML using Oracle9i database. I have 500,000 records of transaction data. There is a complex XML built for each record using the XMLGEN.GET_XML proc. I am able to generate the XML for each of these 1/2 million records. Now, I hav...
  5. XML to Oracle9i
    Dear Experts, I have a simple table in an Oracle9i database with a field that keeps XML content. I would like to have some sample PL/SQL trigger code to show me how to parse the XML content everytime a new row is inserted in that table. While parsing the XML content, the PL/...
  6. Oracle and AMD CPU
    Hi! I'm running WinXP on a Abit UL8 motherboard with AMD Athlon64 3400+ CPU with 2Gb memory. What Oracle10G version should I download and use ? Regards, Tomas H Johannsson

Free Tech Articles

  1. WARNING: 5 Reasons why you should NEVER fix a computer for free.
    It is in our nature to love the puzzle. We are obsessed. The lot of us. We love puzzles. We love the challenge. We thrive on finding the answer. We hate disarray. It bothers us deep in our soul. W...
  2. SCCM OSD Basic troubleshooting
    SCCM 2007 OSD is a fantastic way to deploy operating systems, however, like most things SCCM issues can sometimes be difficult to resolve due to the sheer volume of logs to sift through and the dispe...
  3. Migrate Small Business Server 2003 to Exchange 2010 and Windows 2008 R2
    This guide is intended to provide step by step instructions on how to migrate from Small Business Server 2003 to Windows 2008 R2 with Exchange 2010. For this migration to work you will need the fo...
  4. Create a Win7 Gadget
    This article shows you how to create a simple "Gadget" -- a sort of mini-application supported by Windows 7 and Vista. Gadgets can be dropped anywhere on the desktop to provide instant information, ...
  5. Outlook continually prompting for username and password
    There have been a lot of questions recently regarding Outlook prompting for a username and password whilst using Exchange 2007. There are a few reasons why this would happen and I will try to cover t...
  6. Backup Exchange 2010 Information Store using Windows Backup
    There seems to be quite a lot of confusion around the ability to backup Exchange 2010 using the built in Windows Backup feature. This stems from the omission of this feature prior to Exchange 2007 s...

Cloud Class Webinars

  1. Avoiding Bugs in Microsoft Access
    Alison Balter takes and in-depth look at avoiding bugs in Access. In this webinar you will learn about using the immediate window to debug your applications, invoking the debugger, using breakpoints to troubleshoot, stepping through code, setting the next statement to execute, ...
  2. Top 10 Best New Features in Visio 2010
    Scott Helmers gives live demonstrations of the top 10 new features in Visio 2010. This webinar will teach you how to create compelling diagrams by adding shapes to the page with a single click, linking the shapes in a diagram to data in Excel (or SQL Server, or SharePoint), ...
  3. IT Consultant Business Secrets Revealed
    Michael Munger, Experts Exchange tech pro and IT consultant, pulls back the curtain on his very successful businesses and answers question on every IT consultant and business owner should know about. He shares secrets on what he did to solve the 5 most common problems in IT, ...
  4. Disaster Recovery and Business Continuity
    Quest CTO, Mike Billon, gives an overview of the steps involved in building a dunamic disaster recovery plan. Through case studies and an examination of software/hardware tooles for monitoring and testing, you'll gain a better understandin of where you are, where you want ...
  5. Organize Your Visio Diagrams with Containers and Lists
    Scott Helmers uses cross functional flowcharts, wireframe diagrams, data graphic legends and seating charts to teach you: how to ustilize all three new structured diagram components in Visio 2010, the best practices for organizeing shapes in previous version of Visio, how to organize ...
  6. How to Us Objects, Properties, Events and Methods in Microsoft Access
    Alison Dalter gives an in-depbth look at objects, properties, events and methods in Microsoft Access. In this webinar you will learn about using the object browser, referring to objects, working with properties and methods, working with object variables, understanding the ...

Join the Community

Give a Little. Get a Lot.

Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.

Join the Community

Answers

 

by: schwertnerPosted on 2006-04-03 at 04:21:00ID: 16359594

How you understand that Oracle doesn't use the RAM.
To understand the volume of RAM Oracle uses invoke Oracle enterprise manager
and look at the instance SGA (System Global Area) parameters. There are also GUI based
advisors that will advise you how to increase/decrease the size of the SGA.
Alternatively you can issue:
SQL> show sga

Total System Global Area  680600380 bytes
Fixed Size                   455484 bytes
Variable Size             360710144 bytes
Database Buffers          318767104 bytes
Redo Buffers                 667648 bytes

Normally there are two components that need adjustment:

Database Buffer Cache
Shared Pool

Increase Database Buffer Cache
and Oracle will work faster.

 

by: fargoPosted on 2006-04-03 at 04:35:05ID: 16359765

Hi,

"select * from v$sga" gives me the following
Total SGA                  208.93 MB
Fixed Size                   450780 bytes
Variable Size             285212672 bytes
Database Buffers          33554432 bytes
Redo Buffers                 667648 bytes

Do you see anything wrong?

Moreover how to increase the Database Buffer Cache? Does it mean i need to increase the init paramater named "db_block_buffers". The db_block_size is set to 8192.

Moreover, is it possible to change the parameters for an oracle session just for test to see the actual performance gain, without restarting the db server??

fargo




 

by: angelIIIPosted on 2006-04-03 at 04:40:20ID: 16359784

>Moreover, is it possible to change the parameters for an oracle session just for test to see the actual performance gain, without restarting the db server??
no.

>Moreover how to increase the Database Buffer Cache? Does it mean i need to increase the init paramater named "db_block_buffers". The db_block_size is set to 8192.
yes

>Do you see anything wrong?
no

>Oracle is damn slow.
every query, even on very small tables?
is oracle the only application on the machine?

 

by: fargoPosted on 2006-04-03 at 04:50:32ID: 16359836

Hi,

Basically the SELECT statements are more or less ok. Only point where i see problem is when we import some big data to this db and some bulk load operations.
Yes, Oracle is the only application running in the server.

In the init.ora file i see that the db_block_buffers is 0. What should be the criteria to set the db_block_buffers value. Moreover, how can i make sure that changing this value can very well increase the performance?

regards,
fargo

 

by: fargoPosted on 2006-04-03 at 05:48:28ID: 16360281

Hi

I read that "db_block_buffers is not included in the init.ora by default as it has been deprecated." This means one has to see the db_cache_size parameter in the init.ora. Here is our setting

DB_CACHE_SIZE=33554432

What next?

fargo

 

by: schwertnerPosted on 2006-04-03 at 06:46:57ID: 16360868

DB_CACHE_SIZE=33554432

is abnormally low!

It is in fact
DB_CACHE_SIZE=32M

It has to be over 200M to have a normally working instance.
In production it goes higher, but it depends on thr RAM you have on the computer.

You need also RAM for OS.

 

by: fargoPosted on 2006-04-03 at 06:52:00ID: 16360897

Hi,

Yeah i felt it too and now i m gonna make it higher to around 1000 MB.

Following is the check i did

Total RAM -- 2000 MB
less
PGA for 100 users is coming to   -- 262 MB
20% reserve for OS -- 400

comes to 1400 MB (approx) which is free for data buffers.

So i decided to set it to 1000 MB.

Is this ok? Or is there any other way to calculate about it.

fargo

 

by: schwertnerPosted on 2006-04-03 at 07:07:22ID: 16361069

Overestimating is also wrong. It also causes delays because of the so called latches.
Do it stepwise.
500MB is enough for the fidt iteration.
After that look in OEM --> Memory --->(most of SGA components have advisors, but they need some time of activity to collect statistics).

 

by: fargoPosted on 2006-04-03 at 07:28:25ID: 16361316

i set db_buffer_cache to 500 MB.

And now i m importing something like 180 MB of data using dump. But it takes more than expected. The memory used by oracle is still not that much and i believe, the operation is using disk than memory.

any ideas? what other things should i check?

The OEM advice is giving a constant graph. Means the memory parameters are set correct. What about the pool_size (shared, long, java), do we need to change the settings?

fargo

 

by: actonwangPosted on 2006-04-03 at 07:33:30ID: 16361364

Hi fargo,

       During your table loading, do you have some constraints in the table or triggers or indexes? Try to disable them while you import large data.
       Usually it has nothing to do with db buffer.

Acton

 

by: schwertnerPosted on 2006-04-03 at 07:41:06ID: 16361436

The small SGA prevents the DB to work normally. Bulk loading is rare event, but the DB has to work without bottlenecks after this.

 

by: actonwangPosted on 2006-04-03 at 07:48:38ID: 16361505

hhmm.. We ran into this a lot because we did load a lot of big tables.

fargo, would you see to verify if I am right? I feel that your table must have some constraints or trigger on it.

Acton

 

by: vishal68Posted on 2006-04-03 at 23:42:45ID: 16368083

What is the method you use for bulk loads. From your comments, it looks  like Oracle Import. If it is Oracle import, what are the parameters you are using. The parameters can have a big impact on the import performance

HTH
Vishal

 

by: fargoPosted on 2006-04-04 at 00:02:44ID: 16368170

Hi,

Acton
>>fargo, would you see to verify if I am right? I feel that your table must have some constraints or trigger on it.
I agree with you and it's logical that if we disable the constraints and indexes, the import will work faster.

But friends, the problem is not just refining the import or bulk load but to have a good performing database setup. With increase in db_cache_size, i agree that the performance is gained..but very marginal.

Example case: I have a dump for a table with around 180000 rows and it takes 1.5 minutes to load(disabling the indexes and constraints). It's too much of time i believe. Moreover in TOAD i see that it gives following performance warnings...

1) High Parse to Execute ratio
2) High Parse CPU Overhead

P.S: Please don't relate above messages with any query or something. I believe some db parameter needs to be tuned.

Thanks
fargo

 

by: schwertnerPosted on 2006-04-04 at 00:24:43ID: 16368259

Hello,

if you hope that you can load 180,000 (if this is not typo) records for less then 1.5 minutes then you have to buy an 6-8 processor system and use the parallel
options of Oracle. I guess that your computer is a very powerfull box to reach this excellent productivity.
I assure you that this is very good time and it is not realistic to expect better performance (for this number of records of course).

About your second issue - the prevalent of hard parses. This is known issue and it is based on the fact that Oracle exports prepares the insert statements
without using bind variables. So every statement expires hard parsing and this is registered from Oracle.
To improve things (but only in some extent, do not expect miracles) you can ask Oracle to reuse statements and avoid in many cases the hard parsing.
You have to change CURSOR_SHARING parameter in your SPFILE:
set it 'similar'

 

by: fargoPosted on 2006-04-04 at 00:35:46ID: 16368315

Hi,

the CURSOR_SHARING at the moment is set to EXACT and u propose it to set to SIMILAR..correct?
What does PCTFREE too low for a table indicates?

Do you see that i should change the shared_pool size or java_pool_size or large_pool_size ? I still see that making bulk opertions, oracle doesn't really use good CPU memeory or main memory.

Thx
fargo

 

by: fargoPosted on 2006-04-04 at 00:42:29ID: 16368340

Also that

db_block_size and db_file_multiblock_read_count can have effect? presently set to

db_block_size = 8192
db_file_multiblock_read_count = 32

regards,
fargo

 

by: schwertnerPosted on 2006-04-04 at 00:45:01ID: 16368348

Yes, set it to SIMILAR. This will improve in some extent the reusability of the INSERT statements.

PCTFREE (default 10%) is the free space leaved in every block for further extensions of the records placed in the block. This is done to avoid moving the row in another block and making chain of disk pointers.

This parameter will not help you. I think you can concentrate on DIRECT import that avoid the usage of the SQL engine of Oracle and so avoid the overhead from parsing. But I have never used it and details could be found in Oracle docs - "Utilities".

 

by: schwertnerPosted on 2006-04-04 at 00:47:57ID: 16368362

Forget this. It is for sequential reads. The blocksize is good and the blocks are buffered in the DBcache.
Please do not panic! Your system works fine. You can damage Oracle if you do under stress changes in SPFILE.

 

by: fargoPosted on 2006-04-04 at 02:48:51ID: 16369104

Hi schwertner,

Thanks for your inputs. I do made changes as discussed here. But i still suspect the performance is not good (why? because i m comparing with performance in other machines). In my opinion, the I/O operation..the read/write operation is not performing well.

>>Please do not panic! Your system works fine.
No No, I m in no panic state...the only thing i m trying is to get the understanding of the issue.

Thanks.
fargo

 

by: schwertnerPosted on 2006-04-04 at 05:06:11ID: 16369917

Tablespaces should be placed on diffrent disks (4 at least), RAID problems, etc.

If applications do not use bind variables - next problem.

You have to run STATSPACK to collect statistics and to analyze the wait events.

 

by: fargoPosted on 2006-04-05 at 14:30:22ID: 16386664

Hi,

My problem as stated is not completely solved. But all your comments were helpful.

If anyone can point me to some good links regarding the oracle init parameters setting and tuning (Except Oracle documentatin..those are very deep)

thx
fargo

 

by: schwertnerPosted on 2006-04-05 at 23:57:42ID: 16389435

Thanks Fargo,

but this what you want is a hard task.

Only for CURSOR_SHARING  on the OTN one could find articles 20 pages long.

The main trio is:

DB_BUFFER_CACHE
SHARED_POOL

Also you have to pay attention on the REDO LOG CACHE - If it is big enough.

 

by: fargoPosted on 2006-04-10 at 02:15:51ID: 16415539

hi schwertner, the db is not performing good since we change the filesystem from ext2 to reiserfs format. could this be the reason? if yes, why? I can open up a new question if you think it's that long a discussion.

 

by: schwertnerPosted on 2006-04-10 at 06:56:19ID: 16417335

Hi Fargo, I am in Germany now. Everything in my small project works fine so I can help you.

The filesystem can not cause delay in the DB.
But the DBA should regularly collect and store statistics about the DB.
This is a procedure that should be scheduled to run
e.g. one time weekly.
If you need directions I can post the script.

Also (I know you use SuSE Linux) on the Linux machine
do not install application servers of any kind and especially the SAP Appl. Server.
AS will load heavilly the machine ... We had bad experience making this mistake.

 

by: fargoPosted on 2006-04-10 at 07:05:00ID: 16417427

thanks for your reply. In germany.. where? I am not a DBA, but i m trying to be one. It would be good if you can post the script. I am not sure what is going wrong with the machine..db setup seems to be fine. I am completely stumped at the moment.

 

by: schwertnerPosted on 2006-04-10 at 07:12:10ID: 16417496

Ich bin momentan in Walldorf, Baden- Wurttemberg.
Die SAP Zentralle liegt 100 meter von unserer Firma.

As user SYS:

CREATE OR REPLACE PROCEDURE compute_statistics IS
BEGIN
   dbms_stats.gather_database_stats(cascade=>true);
END compute_statistics;

execute compute_statistics;

-- Schedule the job

set serveroutput on
set linesize 10000
variable x number;
begin
   DBMS_OUTPUT.enable(100000);  
   dbms_job.submit(:x,'compute_statistics;',trunc(sysdate),'trunc(sysdate+7)');
   commit;
   dbms_output.put_line(TO_char(:x));
end;

 

by: fargoPosted on 2006-04-10 at 07:17:10ID: 16417542

Vielen Dank. Ich wohne in Karlsruhe auch in Baden-Württemberg.

i will check the stats.

 

by: schwertnerPosted on 2006-04-10 at 07:57:45ID: 16417930

Interessant!
Wir benutzen auch SuSE Linux und Oracle.
Warscheinlich können wir in Kontakt bleiben.
Mein email ist in mein Profile.
Grüße!

20120131-EE-VQP-002

3 Ways to Join

30-Day Free Trial

The Experts

98% positive feedback on 31,087 answers since March 2000. angeliii is a Microsoft Most Valuable Professional for his work with MS SQL Server & Develoment.

He has also proven his knowledge of Visual Basic Programming, PHP Scripting and Oracle Databases.

The Experts

97% positive feedback on 10,752 answers since July 2000. lrmoore has more than 18 years experience in the networking industry.

The six-time Mircosoft MVPs specialties include firewalls, virtual private networking, and network management.

Testimonials

"...and excellent source for support... Kind of like having your very own IT dept." Electriciansnet

Testimonials

"I was apprehensive at signing up at first. However... it has already made my life as an IT administrator much easier." JaCrews

Testimonials

"WOW! You guys have great, active, and knowledgeable people on here." moore50

Business Clients

Business Clients

In the Press

"If you’ve got a question... Experts Exchange can supply an answer.”

In the Press

"...an invaluable aid for both IT professionals and those who require tech support."

In the Press

"where IT professionals provide quick answers on just about any topic"

Business Account Plans

Loading Advertisement...