Q and A

Asked and Answered

Ever wonder what prefetch size you should use with RAID-5?

I have a question about RAID-5. I was advised to calculate the extentsize as 6*64k/4k [equal] 96 (RAID-5 is 6+1+1 disks). (64K is stipe size of RAID.) Since there is only one container per RAID-5, should I use prefetch size 96 or 96*6[equal] 384?"

Sincerely,

Holo Devnani
Toronto, Canada

Scott Hayes responds:

Questions about RAID come up frequently; I hope I can help clarify what to do with DB2 UDB in a RAID environment.

First, before creating your tablespaces, use the db2set command to set the environment variable DB2_STRIPED_CONTAINERS=ON . By doing so, you will reduce physical I/O by as much as 50 percent.

For tablespaces that are created on RAID devices, tablespace IDs must be either listed in environment variable DB2_PARALLEL_IO , or use an asterisk (*) to indicate all tablespaces are defined on RAID devices. You can find the Tablespace ID by using the command db2 list tablespaces . If tablespaces 3,4,5,6, and 7 are on RAID, the proper command to issue would be db2set DB2_PARALLEL_IO=3,4,5,6,7 .

By setting DB2_PARALLEL_IO , the tablespace PREFETCHSIZE takes on special meaning. PREFETCHSIZE is divided by the EXTENTSIZE to arrive at the degree of I/O parallelism. Without this environment variable set, the degree of I/O parallelism is normally derived from the number of containers. Because RAID often has only one container, it is important to set the PREFETCHSIZE as a multiple of the EXTENTSIZE, to provide a sufficient number of IO_SERVERS (at least one per physical disk), and to assign the tablespace to a bufferpool that is sufficiently large to accommodate to prefetch requests.

If prefetch I/O is not desired because the database supports an OLTP application, then do not include the tablespace ID number in the DB2_PARALLEL_IO environment variable definition, or set PREFETCHSIZE equal to EXTENTSIZE.


See a complete archive of reader/author Q&As .

Back to Top 10 Performance Tips by Scott Hayes.

CAREER CENTER
Ready to take that job and shove it?
SEARCH JOBS
RECENT JOB POSTINGS
CAREER NEWS
10 Search Engines You Don't Know About
Go beyond Google and get vertical. These specialized search sites will help you find the business information you need -- fast.

Subscribe to the new digital version of IBM Database Magazine
New Digital Version

Sponsored links:



Subscribe to the IBM Database Magazine Newsletter

Email Address *
First Name
Last Name
HTML Preference
HTML Text
 

Fields with * are required.

 




Visit these other IBM and TechWeb Partner Sites: :
Maximizing ROI Through Business Process Management (BPM) and Service-Oriented Architecture (SOA)
Internet Evolution – The Macrosite for News, Analysis, & Opinion About the Future of the Internet
Business Innovation – Technology Strategies and Solutions for Driving Business Success


:: IBM Database Magazine ::