how to explain swap on a db2 server

Hello,

How to explain swap on a db2 server?

Thanks

bibi
bibi92Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Kent OlsenData Warehouse Architect / DBACommented:
Hi Bibi,

The system swap space is the same whether DB2 is running or not.  That said, a well tuned DB2 instance tries to function so that it doesn't page out to the system swap space.

DB2 (like all database engines) is an I/O engine.  It manages data on disk and tries to maximize performance by keep the most used and/or most critical data in memory.  When the memory assigned to DB2 is too small, DB2 has to read data from disk into its buffer pool more often.  When the memory assigned to DB2 is too large, the underlying operating system may page swap parts of DB2 out.  That is generally a performance problem as DB2 is working to minimize the amount of data read from disk and the operating system's swapping logic is adding two! disk accesses when the item is swapped out.  If DB2 discards an item in the buffer pool to reuse the memory, it will read it from disk when that data is needed again.  If the operating system swaps out part of DB2, it is written to the swap space, then later reread from swap.  That's a 2-for-1 I/O ratio that you want to avoid.


Kent
0
bibi92Author Commented:
Thanks a lot for your reply. But how can I found the expensive request.

Regards

bibi
0
Kent OlsenData Warehouse Architect / DBACommented:
Hi bibi,

>> found the expensive request?

Sorry -- I don't understand the question....
0
Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

bibi92Author Commented:
Hello,

Yes, I want to find expensives queries, there are maybe the cause of swap.

Regards

bibi
0
Kent OlsenData Warehouse Architect / DBACommented:

Hi bibi,

DB2/LUW logs all of the executed SQL, but not necessarily performance measures for the SQL.  You can see the SQL by querying SYSCAT.STATEMENTS.  That's everything that DB2 has run.

To get performance measures you're going to have to turn on some event monitors and/or use a process monitor that's tailored for your needs.  

This is real DBA work here.  :)   You'll need a place to start.  Do you have specific SQL that you suspect?  Can that SQL be run "at will" so you can collect statistics on it?  Have you taken the usual tuning steps?


Kent
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
bibi92Author Commented:
Thanks bibi
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
DB2

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.