IO Stack [PIC]

January 22, 2008 – 5:29 pm
I/O stack components Overview Typically the stack consists of the following • Database • Character or block device driver • Multipathing driver • SCSI driver • HBA • System Bus • Switch/iSCSI routers • Storage Array • Disks Example of vendors: ASM-Database IBM Oracle Character or block device driver Multipathing driver – PowerPath, Windows MPIO SCSI driver HBA – Host Bus Adapter, Qlogic (IBM), Emulex System Bus - PCI Switch/iSCSI routers – Brocade, McData Storage Array – IBM DS8100, EMC, HDS, HP Disks - Seagate The database processes makes I/O calls to the block device. The I/O scheduler in Linux forms the interface between the generic block layer and the low level device drivers. The block layer provides functions that are utilized by the file systems, databases (10gR2) and the virtual memory manager to submit I/O requests to block devices. These requests are transformed by the I/O scheduler and made available to the low-level device drivers. The device drivers consume the transformed requests and forward them (by using device specific protocols) to the ...

Oracle Query to Determine IO Imposed by Reports or Users

January 22, 2008 – 5:10 pm
Don't forget to add extra IO imposed by users of the database. For example, to determine how much extra I/O will be imposed on the system when the new load is put into place. For example, if more users or reports will be added, determine how much I/O these reports (or a typical user) currently does, then extrapolate for the estimated growth. The query below will assist in getting some of this data. SELECT a.sid, a.statistic#, SUBSTR(b.name,1,40) name, a.value FROM v$sesstat a, v$statname b, v$session se WHERE se.audsid = (select userenv('sessionid') from dual) AND a.statistic# = b.statistic# AND se.sid = a.sid AND b.name in ('physical read total IO requests','physical read total bytes','physical write total IO requests','physical write total bytes') ORDER BY b.class, b.name

IO Characteristics of Your Application

January 22, 2008 – 5:01 pm
IO rate of 1+ Gigabytes/sec is rarely achievable, but hundreds of Megabytes/sec is achieved in lots of high-end production environment. Keep those numbers in mind when planning for what's possible. In Oracle, use AWR reports to determine current I/O metrics (Instance Activity Stats per sec). • IOPS = “physical reads total I/O requests” + “physical writes total I/O requests” • MBytes/s = “physical reads total bytes” + physical writes total bytes” • For RAC environments - aggregate IOPS or MBytes/s for all nodes Now the tricky part – estimating expected I/O throughput rates • Establish what is being expanded – more users, new reports • Pull I/O stats for a given session or transaction and extrapolate to the required number of users. • Ensure data points are representative of the new workload • Know when your Web users get on your system (e.g., peak hour transactions) For new or non-existing applications, use business rules or data model transaction profiles flow ...

2 Gigabit Card - How fast is it?

January 22, 2008 – 4:40 pm
Common misunderstandings: “If I buy 2 Gigabit HBAs I will get 2 Gigabytes of throughput, that’s more than enough throughput for my 400 MB/s application” “I only need 2 disks to store my 1 TB database, now that we have 500GB disk drives are available!” The first misunderstanding is not just about bits vs bytes, its understanding the context of when and where the [unit of measurement] bits vs bytes is used. For example, in the world of networks (Ethernet, Fibre Channel, etc.) bits is a common unit of measurement, whereas bytes is used to describe throughput outside the network; i.e., disks or HBAs. Just be aware of the unit measurement and the context of its use. To convert 2Gbits into Mbytes : 2Gbits = (2* 1024 * 1024 * 1024) / (1024* 1024) / 8bits = 2147483648 / 1048576 = 2048 / 8 = 256Mbytes The second misunderstanding has to do with sizing for capacity instead of sizing for ...

IOPS vs. Mbytes/sec

January 22, 2008 – 4:24 pm
IOPS • The standard unit of measurement for I/O operations per second. Includes all reads and writes. • This is how you rate a I/O stack components ability to process small block random I/O requests. • Used to describe I/O rate driven applications (OLTP, random I/O ) Mbytes/s • Mega”Bytes” per sec • Used to measure large block sequential transfer rates, with no response time characterization • Used to describe data rate driven applications (DSS, OLAP) • Transaction/s – its anything you claim it to be. Oracle query to gather this data from your database: set lines 250 set pages 9999 spool sysmetric_outp.log alter session set nls_date_format='dd-mm-yyyy hh24:mi'; select min(begin_time), max(end_time), sum(case metric_name when 'Physical Read Total Bytes Per Sec' then average end) Physical_Read_Total_Bps, sum(case metric_name when 'Physical Write Total Bytes Per Sec' then average end) Physical_Write_Total_Bps, sum(case metric_name when 'Redo Generated Per Sec' then average end) Redo_Bytes_per_sec, sum(case metric_name when 'Physical Read Total IO Requests Per Sec' then average end) Physical_Read_IOPS, sum(case metric_name when 'Physical Write Total IO Requests Per Sec' then average end) Physical_write_IOPS, sum(case metric_name ...

Performance Definition: throughput

January 22, 2008 – 4:12 pm
Saw this definition from one of the Oracle OpenWorld sessions, thought it was pretty clear and concise: Throughput The measure of the transfer of bits across the media over a given period of time. Commonly used in discussing data transfer rates Due to a number of factors, throughput usually does not match the specified bandwidth. Factors include: The amount and type of traffic on the network The number of network devices encountered in the network path being measured (path latency). In any network (including FC networks), throughput cannot be faster than the slowest link of the path from source to destination. Even if all or most of the segments have high bandwidth, it will only take one segment in the path with low throughput to create a bottleneck to the throughput of the entire network. Bandwidth is the amount of information it is physically possible to send through the media of choice.

Tuning Linux systems for WebSphere Application Server 6.0.x

January 10, 2008 – 6:42 pm
When you have a performance concern, check the operating system settings to determine if these settings are appropriate for your application. Because the Linux operating system is not a WebSphere Application Server product, be aware that it can change and results can vary. Procedure Configure the following settings and variables according to your tuning needs: timeout_timewait parameter Description: Determines the time that must elapse before TCP/IP can release a closed connection and reuse its resources. This interval between closure and release is known as the TIME_WAIT state or twice the maximum segment lifetime (2MSL) state. During this time, reopening the connection to the client and server cost less than establishing a new connection. By reducing the value of this entry, TCP/IP can release closed connections faster, providing more resources for new connections. Adjust this parameter if the running application requires rapid release, the creation of new connections, and a low throughput due to many ...

Tuning Windows systems for WebSphere Application Server 6.0.x

January 10, 2008 – 6:37 pm
IBM describes how to tune Windows 2000, Windows XP, and Windows 2003 operating systems to optimize the performance of WebSphere Application Server. Because Windows operating systems are not WebSphere Application Server products, be aware that the products can change and results can vary. Procedure Configure the following settings or variables according to your specific tuning needs: TcpTimedWaitDelay Description: Determines the time that must elapse before TCP/IP can release a closed connection and reuse its resources. This interval between closure and release is known as the TIME_WAIT state or twice the maximum segment lifetime (2MSL) state. During this time, reopening the connection to the client and server costs less than establishing a new connection. By reducing the value of this entry, TCP/IP can release closed connections faster and provide more resources for new connections. Adjust this parameter if the running application requires rapid release, the creation of new connections, or an adjustment because of a ...

Tuning AIX systems for WebSphere Application Server 6.0.x

January 10, 2008 – 6:28 pm
IBM recommends a number of configuration changes and variables you can set to tune the performance of Websphere to suit your needs. Because the AIX operating system is not a WebSphere Application Server product, be aware that it can change and results can vary. Procedure Change the following configuration settings or variables according to your needs: TCP_TIMEWAIT Description: Determines the time that must elapse before TCP/IP can release a closed connection and reuse its resources. This interval between closure and release is known as the TIME_WAIT state or twice the maximum segment lifetime (2MSL) state. During this time, reopening the connection to the client and server costs less than establishing a new connection. By reducing the value of this entry, TCP/IP can release closed connections faster, providing more resources for new connections. Adjust this parameter, if the running application requires rapid release or the creation of new connections, or if a low throughput occurs ...

Log SAR output to a file for later replay / analysis

October 1, 2007 – 5:26 pm
Commands below are for Linux, but the idea works everywhere 'sadc' is available. 1) Start /usr/lib/sa/sadc Example machine1:~ # /usr/lib/sa/sadc 2 7200 sadc.outfile this logs SAR data for 4 hours. 2) Stop logging, do 'killall sadc' or 'kill' 3) Usage of sar. Creating report with all options sar -A -f Example machine1:~ # sar -A -f sadc.outfile > sar.outfile machine1:~ # cat sar.outfile Linux 2.4.21-75-default (machine1) 12/03/03 13:35:34 proc/s Average: 0.00 13:35:34 cswch/s Average: 38.50 13:35:34 CPU %user %nice %system %idle Average: all 0.06 0.00 0.00 ...