Showing posts with label AIX. Show all posts
Showing posts with label AIX. Show all posts

Saturday, August 25, 2012

cached I/O vs direct I/O


cached I/O

direct I/O



  1. Application issues a read request
  2. Kernel looks for requested data in file buffer cache
  3. Requested data not present in file buffer cache
  4. Kernel reads data from disk
  5. Read data is cached in file buffer cache
  6. Read data is copied from file buffer cache to applicatio buffer
  1. Application issues a read request
  2. Kernel initiates a disk request
  3. Requested data transfered from disk to application buffer

AIO Tuning Recommendations

Parameters for tuning asynchronous I/O
  • minservers The minimum number of aioservers that are started for asynchronous disk I/O. The default value is 1
  • maxservers The maximum number of aioservers that are started for asynchronous disk I/O. The default value is 10. Since each aioserver uses memory, this number should not be much larger than the
    expected amount of simultaneous asynchronous disk I/O requests
  • maxreqs Maximum number of asynchronous disk I/O requests that can be stored in the queue. The default value is 4096
Tuning Recommendations
  • minserver : 2 or Number of CPUs -1, whatever is larger
  • maxserver : Two times the number of datafiles
  • maxreqs : 12288
  • for large systems the number of aioserver processes may become very large and the maximum number of processes per user has to be adopted

File system layout to minimize disk drive contention

This example configuration contains eight data areas, including disk drives, striped sets,
RAID sets, and placeholders for other new technologies to be developed in the future.
Separate the eight data areas as completely as possible. Ideally, operate from different
device controllers or channels to maximize throughput. The more disk drive heads are
moving at one time, the faster the database. To minimize disk drive contention, lay out
the file system disk drives as follows:
  • AREA 1 – Oracle executables and a control file
  • AREA 2 – Data: datafiles, index datafiles, system datafiles, tool datafiles, user datafiles,
    and a control file
  • AREA 3 – Data datafiles, index datafiles, temporary datafiles, undo datafiles, and a
    control file
  • AREA 4 – Archive log files, export files, backup staging area, and a control file
  • AREA 5 – Redo log files
  • AREA 6 – Redo log files
  • AREA 7 – Redo log files
  • AREA 8 – Redo log files
Online redo log files exist on four separate disk drives. Online redo log files are
multiplexed, and Oracle creates these log files in a circular fashion:
redo log 1 =>redo log 2 => redo log 3 => redo log 4 =>redo log 1
As a result, the I/O is evenly distributed. Therefore, when Oracle switches log file
groups, writing to the new redo log files does not impact reading the old redo log file
to create a new archive log file.


Thursday, August 23, 2012

Procedure to reset an account on Aix

When this message is received you'll have to reset the account:

3004-303 There have been too many unsuccessful login attempts; please see
the system administrator.

Procedure to reset the account:

chsec -f /etc/security/lastlog -a "unsuccessful_login_count=0" -s <username>
 
chuser "account_locked=false" <username>

Chsec is the command needed to change an user's security attributes.

Wednesday, August 22, 2012

How to determine the physical RAM size on Aix

lsattr -E -l sys0 -a realmem

vmstat relevant columns with descriptions

Column
Description
kthr
Kernel thread state changes per second over the sampling interval.
r
Number of kernel threads placed in run queue.
b
Number of kernel threads placed in the Virtual Memory Manager (VMM) wait queue (awaiting resource, awaiting input/output).
p
The number of threads waiting on raw I/Os (bypassing journaled file system (JFS)) to complete.
fi/fo
Number of file pages paged in/out per second.
cpu
Breakdown of percentage usage of CPU time. For multiprocessor systems, CPU values are global averages among all processors. Also, the I/O wait state is defined system-wide and not per processor.
us
Average percentage of CPU time executing in the user mode.
sy
Average percentage of CPU time executing in the system mode.
id
Average percentage of time that CPUs were idle and the system did not have an outstanding disk I/O request.
wa
CPU idle time during which the system had outstanding disk/NFS I/O request(s). If there is at least one outstanding I/O to a disk when wait is running, the time is classified as waiting for I/O. Unless asynchronous I/O is being used by the process, an I/O request to disk causes the calling process to block (or sleep) until the request has been completed. Once an I/O request for a process completes, it is placed on the run queue. If the I/Os were completing faster, more CPU time could be used.
pc
Number of physical processors consumed. Displayed only if the partition is running with shared processor.
ec
The percentage of entitled capacity consumed. Displayed only if the partition is running with the shared processor.