ioo 명령어 (AIX 5.3·6.1)
https://archive.horanglab.com/posts/aix-cmd-ioo
핵심 정리
- 입출력(I/O) 관련 조정 값(미리 읽기, 뒤에서 쓰기, 버퍼 수, 비동기 I/O 등)을 보고 바꿉니다. root만 실행할 수 있습니다.
ioo -a(모든 값),ioo -o 이름(값 보기),ioo -o 이름=값(바꾸기),ioo -L [이름](현재·기본·부팅 값, 범위, 유형),ioo -h 이름(도움말).-p는 현재 값과 다음 부팅 값(/etc/tunables/nextboot)을 함께,-r은 다음 부팅 값만 바꿉니다.-d 이름·-D는 기본값으로 되돌립니다.- 자주 보는 값: JFS2 미리 읽기
j2_maxPageReadAhead·j2_minPageReadAhead, JFS 미리 읽기maxpgahead, 무작위 뒤에서 쓰기j2_maxRandomWrite·maxrandwrt, 버퍼j2_dynamicBufferPreallocation·numfsbufs, 원시 LV 버퍼lvm_bufcnt. - 6.1에서는 비동기 I/O 설정(
aio_*,posix_aio_*)도ioo로 다룹니다. 6.1에서 많은 값이 제한된 조정 값이 되어-F를 줘야 목록에 보입니다.
| 항목 | 내용 |
|---|---|
| 버전 | AIX 5.3, AIX 6.1 (6.1에서 -F(제한된 조정 값 표시)가 더해지고, 문서에 AIO·POSIX AIO 조정 값과 JFS2 메모리 사용량 보기가 새로 실림) |
| 원문 | IBM Commands Reference — 5.3 Volume 3, 6.1 Volume 3 |
| 파일 | /usr/sbin/ioo, /etc/tunables/nextboot |
| 관련 명령어 | vmo, schedo, no, nfso, raso, tuncheck, vmstat -v |
목적
입출력(I/O) 조정 값을 관리합니다.
영어 원문
Manages Input/Output (I/O) tunable parameters.
구문
ioo [ -p | -r ] [ -y ] { -o Tunable [ = Newvalue ] }
ioo [ -p | -r ] [ -y ] { -d Tunable }
ioo [ -p | -r ] [ -y ] -D
ioo [ -p | -r ] [ -F ] -a
ioo -h [ Tunable ]
ioo [ -F ] -L [ Tunable ]
ioo [ -F ] -x [ Tunable ]
-o, -d, -x, -L은 여러 번 쓸 수 있습니다. -F는 6.1 구문에만 있습니다.
설명
참고: ioo는 root만 실행할 수 있습니다.
ioo 명령은 입출력 조정 값을 설정합니다. 모든 I/O 조정 값의 현재 값이나 다음 부팅 값을 설정하거나 보여 주며, 바꾼 것을 영구로 하거나 다음 재부팅까지 미룰 수 있습니다. 설정할지 보여 줄지는 함께 주는 플래그가 정하며, -o는 값을 보여 줄 수도, 새 값을 설정할 수도 있습니다.
- 프로세스가 파일을 차례로 읽으면,
minpgahead값은 그런 상황을 처음 알아챘을 때 미리 읽을 페이지 수를 정합니다.maxpgahead값은 앞선 연속 읽기가 몇 번이든 미리 읽을 최대 페이지 수를 정합니다. - 파일 시스템 bufstruct 수(
numfsbufs)와 뒤에서 쓰기(write behind) 알고리즘이 처리하는 데이터 양(numclust)도 조정할 수 있습니다.
참고(6.1): 시스템 전체에 적용되는 조정 값은 WPAR 안에서 바꾸지 못할 수 있습니다.
조정 값을 바꾸는 영향
ioo를 잘못 쓰면 성능이 떨어지거나 운영 체제가 실패할 수 있습니다. ioo로 실험하기 전에 "Performance overview of the Virtual Memory Manager"를 익힙니다.
조정 값을 바꾸기 전에 아래 조정 값 절에서 그 값의 특성을 모두 읽고, Refer To 안내를 따라가 목적을 완전히 이해합니다. 그다음 그 값의 Diagnosis와 Tuning 설명이 정말 지금 상황에 맞는지, 값을 바꾸면 성능이 나아질지 확인합니다. Diagnosis와 Tuning이 모두 "N/A"면, AIX 개발 부서가 따로 지시하지 않는 한 바꾸지 않는 것이 좋습니다.
영어 원문
Note: The ioo command can be executed only by root.
The ioo command configures Input/Output (I/O) tuning parameters. This command sets or displays current or next boot values for all I/O tuning parameters. This command can also make permanent changes or defer changes until the next reboot. Whether the command sets or displays a parameter, is determined by the accompanying flag. The -o flag can either display the value of a parameter or set a new value for a parameter.
If a process reads sequentially from a file, the values that are specified by the minpgahead parameter determine the number of pages to be read ahead when the condition is first detected. The value that is specified by the maxpgahead parameter sets the maximum number of pages that are read ahead, regardless of the number of preceding sequential reads.
The operating system allows tuning of the number of file system bufstructs (numfsbuf) and the amount of data that is processed by the write behind algorithm (numclust).
Note: The tunable variables which apply to the entire system might not be modified from within a workload partition.
Understanding the Effect of Changing Tunable Parameters
Misuse of the ioo command can cause performance degradation or operating-system failure. Before you start experimenting with the ioo command, you must be familiar with Performance overview of the Virtual Memory Manager.
Before you modify any tunable parameter, you must first read about all its characteristics in the Tunable Parameters section, and follow any Refer To pointer, to fully understand its purpose.
You must then make sure that the Diagnosis and Tuning sections for this parameter truly apply to your situation and that changing the value of this parameter might help improve the performance of your system.
If both the Diagnosis and Tuning sections contain only "N/A", you must probably never change this parameter unless directed by AIX development.
플래그
| 플래그 | 설명 |
|---|---|
-a |
모든 조정 값의 현재 값(-r이면 재부팅 값, -p면 영구 값)을 한 줄에 tunable = value 하나씩 보여 줍니다. 영구 값은 재부팅 값과 현재 값이 같을 때만 보이고, 아니면 NONE입니다. |
-d Tunable |
조정 값을 기본값으로 되돌립니다. 기본값이 아니어서 바꿔야 하는데 Bosboot·Reboot 유형이거나, Incremental 유형이 기본값에서 바뀌었고 -r을 함께 쓰지 않았으면, 경고만 내고 바꾸지 않습니다. |
-D |
모든 조정 값을 기본값으로 되돌립니다. 제약은 -d와 같습니다. |
-F |
-a, -L, -x만 줘서 모든 조정 값을 나열할 때 제한된(restricted) 조정 값도 보여 줍니다. -F가 없으면 이름을 직접 지정하지 않는 한 보이지 않습니다. 6.1부터 |
-h [Tunable] |
조정 값의 도움말을 보여 줍니다. 이름이 없으면 사용법을 보여 줍니다. |
-L [Tunable] |
조정 값 하나나 전부의 특성(현재·기본·재부팅 값, 최소·최대, 단위, 유형, 의존 관계)을 한 줄에 하나씩 보여 줍니다. |
-o Tunable[=Newvalue] |
값을 보여 주거나 Newvalue로 바꿉니다. 바꿔야 하는데 Bosboot·Reboot 유형이거나, Incremental 유형이고 현재 값이 새 값보다 크며 -r이 없으면 바꾸지 않고 경고합니다. -r과 함께 새 값 없이 쓰면 다음 부팅 값을, -p와 함께 새 값 없이 쓰면 현재 값과 다음 부팅 값이 같을 때만 값을(아니면 NONE) 보여 줍니다. |
-p |
-o, -d, -D와 함께 쓰면 현재 값과 재부팅 값을 함께 바꿉니다. 곧 현재 값과 함께 /etc/tunables/nextboot도 고칩니다. 현재 값을 바꿀 수 없는 Reboot·Bosboot 유형에는 쓸 수 없습니다. -a나 새 값 없는 -o와 함께 쓰면 현재 값과 다음 부팅 값이 같을 때만 값을 보여 줍니다. |
-r |
-o, -d, -D와 함께 쓰면 재부팅 값을 바꿉니다(/etc/tunables/nextboot를 고침). Bosboot 유형을 바꾸면 bosboot를 실행하라고 묻습니다. -a나 새 값 없는 -o와 함께 쓰면 현재 값 대신 다음 부팅 값을 보여 줍니다. |
-x [Tunable] |
조정 값 하나나 전부의 특성을 스프레드시트 형식(tunable,current,default,reboot,min,max,unit,type,{dtunable})으로 한 줄에 하나씩 보여 줍니다. |
-y |
bosboot를 실행하기 전의 확인 질문을 하지 않습니다. |
유형(TYPE): D 동적(Dynamic), S 정적(Static), R 재부팅(Reboot), B bosboot(Bosboot), M 마운트(Mount), I 증가만(Incremental), C 연결(Connect), d 폐기 예정(Deprecated).
- 제한된 조정 값을 바꾸면 경고를 보여 주고,
-r이나-p를 주면 확인을 받습니다.-r·-p로 기본값과 다르게 바꿔/etc/tunables/nextboot에 남은 제한된 조정 값은 재부팅할 때 오류 로그 항목을 남깁니다(6.1). - 값에는 K(2의 10제곱), M(20제곱), G(30제곱), T(40제곱), P(50제곱), E(60제곱) 같은 단위 약어를 쓸 수 있습니다. 예를 들어 1024는
1K입니다. - Mount 유형을
-o,-d,-D로 바꾸면 이후에 마운트하는 것에만 적용된다는 경고가 나옵니다.
-L 출력 예:
NAME CUR DEF BOOT MIN MAX UNIT TYPE
DEPENDENCIES
--------------------------------------------------------------------------------
minpgahead 2 2 2 0 4K 4KB pages D
maxpgahead
--------------------------------------------------------------------------------
maxpgahead 8 8 8 0 4K 4KB pages D
minpgahead
--------------------------------------------------------------------------------
pd_npages 64K 64K 64K 1 512K 4KB pages D
--------------------------------------------------------------------------------
numfsbufs 196 196 196 M
--------------------------------------------------------------------------------
CUR는 현재 값, DEF는 기본값, BOOT는 재부팅 값, MIN·MAX는 최솟값·최댓값, UNIT은 단위, TYPE은 유형, DEPENDENCIES는 이 값과 관련된 조정 값 목록(한 줄에 하나)입니다.
영어 원문
-h[Tunable] — Displays help about the Tunable parameter if one is specified. Otherwise, displays the ioo command usage statement.-a— Displays current, reboot (when used with-r) or permanent (when used with-p) value for all tunable parameters, one per line in pairstunable = value. For the permanent option, a value is only displayed for a parameter if its reboot and current values are equal. OtherwiseNONEdisplays as the value.-dTunable — Resets Tunable to its default value. If a Tunable must be changed (that is, it is not set to its default value) and is of type Bosboot or Reboot, or if it is of type Incremental and is changed from its default value, and-ris not used in combination, it is not changed but a warning displays.-D— Resets all tunables to their default value. If tunables that must be changed are of type Bosboot or Reboot, or are of type Incremental and were changed from their default value, and-ris not used in combination, they are not changed but a warning displays.-oTunable
[=NewValue ] Displays the value or sets Tunable to NewValue. If a Tunable must be changed (the specified value is different from current value), and is of type Bosboot or Reboot, or if it is of type Incremental and its current value is bigger than the specified value, and -r is not used in combination, it is not changed but a warning displays.
When -r is used without a NewValue, the nextboot value for tunable displays. When -p is used without a NewValue, a value displays only if the current and next boot values for the Tunable are the same. Otherwise NONE displays as the value.
-p Specifies that the changes apply to both the current and reboot values when used in combination with the -o, -d, or -D flags. Turns on the updating of the /etc/tunables/nextboot file in addition to the updating of the current value. These combinations cannot be used on Reboot and Bosboot type parameters, their current value cannot be changed.
When used with -a or -o without specifying a new value, the values display only if the current and next boot values for a parameter are the same. Otherwise NONE displays as the value.
-r Makes changes that apply to reboot values when used with the -o, -d, or -D flags. That is, it turns on the updating of the /etc/tunables/nextboot file. If any parameter of type Bosboot is changed, the user is prompted to run bosboot.
When used with -a or -o without specifying a new value, next boot values for tunables display instead of current values.
-F Forces restricted tunable parameters to be displayed when you specify the -a, -L , or -x flag on the command line. If you do not specify the -F flag, restricted tunables are not included, unless they are named in association with a display flag (the -o, -a , -x, or -L flag). -L [Tunable] Lists the characteristics of one or all tunables, one per line, by using the following format:
NAME CUR DEF BOOT MIN MAX UNIT TYPE
DEPENDENCIES
--------------------------------------------------------------------------------
minpgahead 2 2 2 0 4K 4KB pages D
maxpgahead
--------------------------------------------------------------------------------
maxpgahead 8 8 8 0 4K 4KB pages D
minpgahead
--------------------------------------------------------------------------------
pd_npages 64K 64K 64K 1 512K 4KB pages D
--------------------------------------------------------------------------------
maxrandwrt 0 0 0 0 512K 4KB pages D
--------------------------------------------------------------------------------
numclust 1 1 1 0 16KB/cluster D
--------------------------------------------------------------------------------
numfsbufs 196 196 196 M
--------------------------------------------------------------------------------
recoveryMode 1 1 1 0 1 N/A D
--------------------------------------------------------------------------------
...
where:
CUR = current value
DEF = default value
BOOT = reboot value
MIN = minimal value
MAX = maximum value
UNIT = tunable unit of measure
TYPE = parameter type: D (for Dynamic), S (for Static), R (for Reboot),
B (for Bosboot), M (for Mount), I (for Incremental),
C (for Connect), and d (for Deprecated)
DEPENDENCIES = list of dependent tunable parameters, one per line
-x[Tunable] — Lists the characteristics of one or all tunables, one per line, by using the following (spreadsheet) format:tunable,current,default,reboot,min,max,unit,type,{dtunable } where: current = current value default = default value reboot = reboot value min = minimal value max = maximum value unit = tunable unit of measure type = parameter type: D (for Dynamic), S (for Static), R (for Reboot), B (for Bosboot), M (for Mount), I (for Incremental), C (for Connect), and d (for Deprecated) dtunable = space separated list of dependent tunable parameters-y— Suppresses the confirmation prompt before the bosboot command is run.
If you modify (by using the -o, -d or -D flags) a restricted tunable parameter, it results in a warning message to warn the user that a tunable parameter of the restricted-use type is modified. If you also specify the -r or -p flags, you are prompted for confirmation of the change. In addition, at system reboot, the presence of restricted tunable parameters, which are in the /etc/tunables/nextboot file, is modified to a value that is different from their default value (by using a command line that specifies the -r or -p flags). The modification results in an error log entry that identifies the list of these modified tunable parameters.
When you modify a tunable, you can specify a tunable parameter value by using the abbreviations K, M, G, T, P, and E to indicate their correspondent values:
Abbreviation Power of two K 210 M 220 G 230 T 240 P 250 E 260
Thus, a tunable value of 1024 might be specified as 1-K.
Any change (with the -o, -d or -D flags) to a parameter of type Mount results in a message, warning you that the change is only effective for future mountings.
Any change (with the -o, -d or -D flags) to a parameter of type Connect results in inetd being restarted, and a message, warning you that the change is only effective for future socket connections.
Any attempt to change (with the -o, -d or -D flags) a parameter of type Bosboot or Reboot without -r, results in an error message.
Any attempt to change (with the -o, -d or -D flags but without the -r flag) the current value of a parameter of type Incremental with a new value smaller than the current value, results in an error message.
Tunable Parameters Type
All the tunable parameters that are manipulated by the tuning commands (no, nfso, vmo, ioo, raso, and schedo) are classified into these categories:
- Dynamic — If the parameter can be changed at any time
- Static — If the parameter can never be changed
- Reboot — If the parameter can be changed only during reboot
- Bosboot — If the parameter can be changed only by running bosboot and rebooting the machine
- Mount — If changes to the parameter are only effective for future file systems or directory mounts
- Incremental — If the parameter can be incrementally increased, except at boot time
- Connect — If changes to the parameter are only effective for future socket connections
- Deprecated — If changing this parameter is no longer supported by the current release of AIX.
For parameters of type Bosboot, whenever a change is performed, the tuning commands automatically prompt the user to ask if they want to execute the bosboot command. For parameters of type Connect, the tuning commands automatically restart the inetd daemon.
Note: The current set of parameters that is managed by the ioo command includes only Static, Dynamic, Mount, and Incremental types.
Compatibility Mode
When running in pre-5.2 compatibility mode (controlled by the pre520tune attribute of sys0 in thePerformance management ), reboot values for parameters, except those parameters that are of type Bosboot, are not meaningful because in this mode they are not applied at boot time.
In pre-5.2 compatibility mode, setting reboot values to tuning parameters continues to be achieved by embedding calls to tuning commands in scripts that are called during the boot sequence. Parameters of type Reboot can therefore be set without the -r flag so that existing scripts continue to work.
This mode is automatically turned ON when a machine is migrated to AIX 5.2. For complete installations, it is turned OFF and the reboot values for parameters are set by applying the content of the /etc/tunables/nextboot file during the reboot sequence. Only in that mode are the -r and -p flags fully functional. See Kernel Tuning in Performance Tools Guide and Reference for more information.
조정 값
각 조정 값의 기본값과 범위는 ioo -h 이름으로 봅니다. 아래는 6.1 문서에 실린 조정 값과 그 쓰임입니다.
| 조정 값 | 목적 | 조정 참고 |
|---|---|---|
aio_active |
AIO 커널 확장을 쓰고 고정(pin)했는지 나타냄 | 1이면 쓰고 고정한 상태 |
aio_maxreqs |
한 번에 처리 중일 수 있는 비동기 I/O 요청의 최대 수 | 진행 중인 요청과 큐에서 기다리는 요청을 모두 셈. limits.h의 AIO_MAX보다 작을 수 없음. 비동기 I/O가 많으면 더 크게 |
aio_maxservers |
느린 경로 I/O를 처리하는 AIO 서버(커널 프로세스)의 최대 수 | CPU당 값. minservers보다 작을 수 없고, 동시에 진행할 수 있는 비동기 I/O 수를 제한함 |
aio_minservers |
늘 살아 있는 AIO 서버의 최소 수 | CPU당 값. 확장을 올릴 때는 서버를 만들지 않고, 요청이 오면 maxservers까지 만듦. 한 번 넘으면 이 수 아래로 줄지 않음 |
aio_server_inactivity |
AIO 서버가 요청 없이 잠자는 시간 | 넘으면 서버가 끝남. 다만 minservers 아래로 내려가면 다시 잠듦 |
j2_atimeUpdateSymlink |
1이면 readlink 때 JFS2 심볼릭 링크의 접근 시간을 갱신 | 0이면 갱신하지 않음. 켜면 성능 부담이 있어 꼭 필요할 때만. JFS·다른 UNIX와의 호환용 |
j2_dynamicBufferPreallocation |
bufstruct가 모자랄 때 미리 할당할 16KB 단위 수 | 16이면 256KB. 다시 마운트할 필요 없음. vmstat -v의 "external pager filesystem I/Os blocked with no fsbuf"가 늘면 올림. 0이면 동적 할당을 끔 |
j2_inodeCacheSize |
JFS2 inode 캐시가 쓰는 메모리 양 | 크기 자체가 아니라 주 메모리 크기와 함께 최대 사용량을 정하는 비율 |
j2_maxPageReadAhead |
JFS2에서 차례로 읽는 파일의 최대 미리 읽기 페이지 수 | minfree와 maxfree의 차이는 늘 이 값 이상이어야 함. 올려서 빨라지면 다른 응용 프로그램이 느려지지 않는지 봄 |
j2_maxRandomWrite |
JFS2 뒤에서 쓰기 전에 RAM에 모아 둘 무작위 쓰기의 임계값 | 파일마다 적용. syncd가 너무 많은 페이지를 내보낼 때 쓸모 |
j2_metadataCacheSize |
JFS2 메타데이터 캐시가 쓰는 메모리 양 | j2_inodeCacheSize처럼 주 메모리 크기와 함께 쓰는 비율 |
j2_minPageReadAhead |
JFS2에서 차례로 읽는 파일의 최소 미리 읽기 페이지 수 | 큰 순차 접근이 많으면 올림. 완전히 무작위 I/O면 0이 쓸모 있을 수 있음 |
j2_nPagesPerWriteBehindCluster |
JFS2 뒤에서 쓰기가 클러스터마다 처리하는 페이지 수 | 순차 I/O에서 I/O 전에 RAM에 더 모으려면 올림. 스트라이프 LV나 디스크 배열에 맞음 |
j2_nRandomCluster |
무작위 쓰기로 볼 쓰기 사이의 거리(클러스터 단위) | 무작위 뒤에서 쓰기(j2_maxRandomWrite)를 켜고 무작위 I/O일 때 올림 |
j2_recoveryMode |
JFS2 쓰기 오류에서 회복하는 방식 | 기본 1은 자동 회복, 0은 마운트를 풀 때까지 성능 저하(degraded) 상태로 남음 |
j2_syncPageCount |
sync 시스템 호출이 한 번에 디스크에 쓰는 파일의 수정 페이지 최대 수 | 파일 캐시를 쓰며 무작위 쓰기가 많으면 sync가 오래 걸리지 않게 조정 |
j2_syncPageLimit |
sync가 j2_syncPageCount로 제한하는 횟수의 최대. 넘으면 수를 늘려 sync를 진행 |
j2_syncPageCount를 설정할 때 함께 설정. 효과가 모자라면 올림 |
lvm_bufcnt |
원시(raw) 물리 I/O에 쓰는 LVM 버퍼 수 | LVM은 큰 원시 I/O를 128KB 버퍼로 나눔. 9면 약 1MB까지 기다림 없이 처리. 스트라이프 원시 LV에 1.125MB보다 크게 쓰면 올림 |
maxpgahead |
차례로 읽는 파일(JFS)의 최대 미리 읽기 페이지 수 | 2의 거듭제곱이고 minpgahead 이상. 커널 제한 때문에 512를 넘기지 않음. minfree·maxfree 차이는 이 값 이상 |
maxrandwrt |
뒤에서 쓰기 전에 RAM에 모아 둘 무작위 쓰기의 임계값(4KB 페이지) | vmstat n에서 sync 때 page out과 I/O 대기가 주기적으로 치솟으면 1 이상으로. 0은 끔. 처리량보다 응답 시간을 중시할 때 |
numclust |
VMM 순차 뒤에서 쓰기가 처리하는 16KB 클러스터 수 | 순차 I/O에서 RAM에 더 모으려면 올림. 스트라이프 LV나 디스크 배열에 맞음 |
numfsbufs |
파일 시스템 bufstruct 수 | 다시 마운트해야 적용. bufstruct를 기다리는 일이 잦으면(스트라이프 LV, 디스크 배열) 올림 |
pd_npages |
파일을 지울 때 RAM에서 한 번에 지울 페이지 수 | 실시간 응용 프로그램에서만 쓸모. 파일 삭제 중 응답이 느려지면 줄여서 삭제를 고르게 나눔 |
posix_aio_active |
POSIX AIO 커널 확장을 쓰고 고정했는지 나타냄 | 1이면 쓰고 고정한 상태 |
posix_aio_maxreqs |
POSIX AIO의 동시 요청 최대 수 | aio_maxreqs와 같음 |
posix_aio_maxservers |
POSIX AIO 서버의 최대 수 | 프로세서당 값. aio_maxservers와 같음 |
posix_aio_minservers |
POSIX AIO 서버의 최소 수 | CPU당 값. aio_minservers와 같음 |
posix_aio_server_inactivity |
POSIX AIO 서버가 요청 없이 잠자는 시간 | aio_server_inactivity와 같음 |
5.3 문서에는 aio_*, posix_aio_*, j2_atimeUpdateSymlink, j2_recoveryMode, j2_syncPageCount, j2_syncPageLimit가 없고, 대신 minpgahead, j2_maxUsableMaxTransfer, j2_nBufferPerPagerDevice, j2_nonFatalCrashesSystem, j2_syncModifiedMapped, jfs_clread_enabled, jfs_use_read_lock, pgahd_scale_thresh, pv_min_pbuf, sync_release_ilock이 실려 있습니다. 5.3에서 비동기 I/O 설정은 smitty aio나 chdev -l aio0로 다룹니다.
영어 원문
For default values and range of values for tunables, refer the ioo command help (-h <tunable_parameter_name>).
aio_active— Purpose: Indicates whether the AIO kernel extension is used and pinned. Tuning: A value of 1 indicates that the AIO kernel extension is used and pinned.aio_maxreqs— Purpose: Specifies the maximum number of asynchronous I/O requests that can be outstanding at one time. Tuning: The specified number includes I/O requests that are in progress, as well as those requests that are waiting in queues to be initiated. The maximum number of asynchronous I/O requests cannot be less than the value ofAIO_MAX, as defined in the/usr/include/sys/limits.hfile, but can be greater. It would be appropriate for a system with a high volume of asynchronous I/O to have a maximum number of asynchronous I/O requests larger thanAIO_MAX.aio_maxservers— Purpose: Specifies the maximum number of AIO servers (kernel processes dedicated to asynchronous I/O processing) allowed to service slow path I/O requests. Tuning: This value is a per cpu value. The value of maxservers cannot be less than minservers. There can never be more than this many asynchronous I/O requests in progress at one time, so this number limits the possible I/O concurrency.aio_minservers— Purpose: Specifies the minimum number of AIO servers (kernel processes dedicated to asynchronous I/O processing) that remain active to process slow path I/O requests. Tuning: This value is a per cpu value. The value of minservers cannot be greater than maxservers. When the kernel extension is loaded, no AIO servers are created regardless of the current or default settings. This value allows a minimal AIO footprint on systems where AIO is never used. As I/O requests are initiated, AIO servers are created to service them until the maximum value allowed by maxservers is reached. Once the minservers value is exceeded, the number of servers does not fall below minservers.aio_server_inactivity— Purpose: Specifies how long an AIO server sleeps without servicing an I/O request. Tuning: When this time limit is exceeded, the server exits, unless it causes the number of available servers to fall below minservers. In this case the server goes back to sleep. The time the server sleeps in this rare case is the larger of the times that are specified for the current and default values forserver_inactivity. It is a rare case and indicates that there might be an imbalance between the number of available servers and the amount of I/O.j2_atimeUpdateSymlink— Purpose: Ifj2_atimeUpdateSymlinkis set to 1, then the access time of the symbolic link of Enhanced journaled file system (JFS2 or Enhanced JFS) is updated on readlink. Tuning: A value of 0 indicates that the access time of JFS2 symbolic links is not updated on readlink. There is a performance penalty that is associated with turningj2_atimeUpdateSymlinkon, so this tunable must not be changed unless there is a real need for it. SUSv3 does not require that access time be updated on readlink, however JFS, and many other platforms do update the access time on readlink. This tunable is provided for compatibility with JFS and other UNIX conformant systems.j2_dynamicBufferPreallocation— Purpose: Specifies the number of 16-K slabs to preallocate when the file system is running low of bufstructs. Tuning: A value of 16 represents 256-K. File system does not need remounting. The bufstructs for JFS2 are now dynamic; the number of buffers that start on the paging device is controlled byj2_nBufferPerPagerDevice, but buffers are allocated and destroyed dynamically after this initial value. If the number of "external pager file system I/Os blocked with no fsbuf (from vmstat -v) increases, thej2_dynamicBufferPreallocationmust be increased for that file system, as the I/O load on the file system might be exceeding the speed of preallocation. A value of 0 disables dynamic buffer allocation completely.j2_inodeCacheSize— Purpose: Controls the amount of memory JFS2 uses for the inode cache. Tuning: The value does not explicitly indicate the amount that might be used, but is instead a scaling factor; it is used in combination with the size of the main memory to determine the maximum memory usage for the inode cache.j2_maxPageReadAhead— Purpose: Specifies the maximum number of pages to be read ahead when a sequentially accessed file is processed on JFS2. Tuning: The difference between minfree and maxfree must always be equal to or greater thanj2_maxPageReadAhead. If run time decreases when the value ofj2_maxPageReadAheadincreases, ensure that the other performance of the other applications does not deteriorate.j2_maxRandomWrite— Purpose: Specifies a threshold for random writes to accumulate in RAM before subsequent pages are flushed to disk by the write behind algorithm of JFS2. Tuning: The random write behind threshold is on a per-file basis. Useful if too many pages are flushed out by syncd.j2_metadataCacheSize— Purpose: Controls the amount of memory Enhanced JFS uses for the metadata cache. Tuning: The value does not explicitly indicate the amount that is not used, but is instead a scaling factor; it is used in combination with the size of the main memory to determine the maximum memory usage for the inode cache.j2_minPageReadAhead— Purpose: Specifies the minimum number of pages to be read ahead when processing a sequentially accessed file on Enhanced JFS. Tuning: Useful to increase if there are lots of large sequential accesses. Ensure that the performance of the other application does not deteriorate. Value of 0 might be useful if I/O pattern is purely random.j2_nPagesPerWriteBehindCluster— Purpose: Specifies the number of pages, per cluster, that is processed by the write behind algorithm of Enhanced JFS. Tuning: Useful to increase if more pages must be kept in RAM before they are scheduled for I/O, when the I/O pattern is sequential. It might be appropriate to increase, if striped logical volumes or disk arrays are being used.j2_nRandomCluster— Purpose: Specifies the distance apart (in clusters) that writes must exceed to be considered as random by the random write behind algorithm of Enhanced JFS. Tuning: Useful to increase if more pages must be kept in RAM before they are scheduled for I/O, when the I/O pattern is random and random write behind is enabled (j2_maxRandomWrite).j2_recoveryMode— Purpose: Sets the behavior for recovery from JFS2 write errors. Tuning: The default value of 1 indicates that automatic recovery from JFS2 write errors is set. The value of 0 indicates that the file systems remain in a degraded mode until unmounted.j2_syncPageCount— Purpose: Sets the maximum number of modified pages of a file that is written to disk by the sync system call in a single operation. Tuning: When an application that uses file system caching is run and does large numbers of random writes, it might be necessary to adjust this setting to avoid lengthy delays during sync operations.j2_syncPageLimit— Purpose: Sets the maximum number of times that the sync system call usesj2_syncPageCountto limit pages written before increasing that count to allow progress on the sync operation. Tuning: This tunable must be set whenj2_syncPageCountis set and must be increased if the effect of thej2_syncPageCountchange is not sufficient.lvm_bufcnt— Purpose: Specifies the number of LVM buffers for raw physical I/Os. Tuning: Applications performing large writes to striped raw logical volumes are not obtaining the wanted throughput rate. LVM splits large raw I/Os into multiple buffers of 128-K a piece. A value of 9 means that about 1 MB I/Os can be processed without waiting for more buffers. If a system is configured to have striped raw logical volumes and is doing writes greater than 1.125 MB, increasing this value might help the throughput of the application. If a system performs larger than 1 MB raw I/Os, it might be useful to increase this value.- maxpgahead — Purpose: Specifies the maximum number of pages to be read ahead when a sequentially accessed file is processed. Tuning: The value must be a power of two and must be greater than or equal to minpgahead. Observe the elapsed execution time of critical sequential-I/O-dependent applications with the time command. Because of limitations in the kernel, do not exceed 512 as the maximum value used. The difference between minfree, and maxfree must always be equal to or greater than maxpgahead. If execution time decreases with higher maxpgahead, observe other applications to ensure that their performance does not deteriorate.
- maxrandwrt — Purpose: Specifies a threshold (in 4 KB pages) for random writes to accumulate in RAM before subsequent pages are flushed to disk by the write behind algorithm. Tuning: The random write behind threshold is on a per-file basis. The maximum value indicates the largest file size, in pages. You can change the value if vmstat n shows page out and I/O wait time peaks at regular intervals (usually when the sync daemon is writing pages to disk). It is useful to set this value to 1 or higher if numerous I/O occurs when syncd runs. A value of 0 disables random write behind and indicates that random writes stay in RAM until a sync operation. Setting maxrandwrt ensures that these writes get flushed to disk before the sync operation occurs. However, it might degrade performance, because the file is then being flushed each time. Tune this option to favor interactive response time over throughput. After the threshold is reached, all subsequent pages are then immediately flushed to disk. The pages up to the threshold value stay in RAM until a sync operation.
- numclust — Purpose: Specifies the number of 16-K clusters that are processed by the sequential write behind algorithm of the VMM. Tuning: Useful to increase if more pages must be kept in RAM before they are scheduled for I/O, when the I/O pattern is sequential. It might be appropriate to increase if striped logical volumes or disk arrays are being used.
- numfsbufs — Purpose: Specifies the number of file system bufstructs. Tuning: File system must be remounted. If the VMM must wait for a free bufstruct, it puts the process on the VMM wait list before the start I/O is issued and wakes it up, once a bufstruct is available. might be appropriate to increase if striped logical volumes or disk arrays are being used.
pd_npages— Purpose: Specifies the number of pages that must be deleted in one chunk from RAM when a file is deleted. Tuning: The maximum value indicates the largest file size, in pages. Real-time applications that experience sluggish response time while files are being deleted. Tuning this option is only useful for real-time applications. If real-time response is critical, adjusting this option might improve response time by spreading the removal of file pages from RAM more evenly over a workload.posix_aio_active— Purpose: Indicates whether the AIO kernel extension is used and pinned. Tuning: A value of 1 indicates that the AIO kernel extension is used and pinned.posix_aio_maxreqs— Purpose: Specifies the maximum number of asynchronous I/O requests that can be outstanding at one time. Tuning: The specified number includes I/O requests that are in progress, as well as those requests that are waiting in queues to be initiated. The maximum number of asynchronous I/O requests cannot be less than the value ofAIO_MAX, as defined in the/usr/include/sys/limits.hfile, but can be greater. It would be appropriate for a system with a high volume of asynchronous I/O to have a maximum number of asynchronous I/O requests larger thanAIO_MAX.posix_aio_maxservers— Purpose: Specifies the maximum number of AIO servers (kernel processes dedicated to asynchronous I/O processing) allowed to service slow path I/O requests. Tuning: This value is a per processor value. The value of maxservers cannot be less than minservers. There can never be more than this many asynchronous I/O requests in progress at one time, so this number limits the possible I/O concurrency.posix_aio_minservers— Purpose: Specifies the minimum number of AIO servers (kernel processes dedicated to asynchronous I/O processing) that remain active to process slow path I/O requests. Tuning: This value is a per cpu value. The value of minservers cannot be greater than maxservers. When the kernel extension is loaded, no AIO servers are created, regardless of the current or default settings. This handling allows a minimal AIO footprint on systems where AIO is never used. As I/O requests are initiated, AIO servers are created to service them until the maximum allowed by maxservers is reached. Once the minservers values exceed, the number of servers does not fall below minservers.posix_aio_server_inactivity— Purpose: Specifies how long an AIO server sleeps without servicing an I/O request. Tuning: When the time limit is exceeded, the server exits, unless it causes the number of available servers to fall below minservers. In this case the server goes back to sleep. The time the server sleeps in this rare case is the larger of the times that are specified for the current and default values forserver_inactivity. It is a rare case and indicates that there might be an imbalance between the number of available servers and the amount of I/O.
메모리 사용량과 통계
6.1 문서에만 있는 절입니다.
- 파일 시스템 메모리 사용량:
cat /proc/sys/fs/jfs2/memory_usage. 메타데이터 캐시, inode 캐시, 전체 메모리 사용량을 바이트로 보여 줍니다. - 파일 시스템 통계:
cat /proc/sys/fs/jfs2/statistics. icache 적중, icache 실패, icache 활성화 수를 보여 줍니다.
영어 원문
To display the file system memory usage, enter the following command: cat /proc/sys/fs/jfs2/memory_usage
This returns the metadata cache, the inode cache, and the total memory usage in bytes.
To display the file system statistics, enter the following command: cat /proc/sys/fs/jfs2/statistics
This returns the number of icache hits, icache misses, and icache activates.
보안
RBAC 사용자와 Trusted AIX 사용자는 주의하세요. 이 명령은 특권 작업을 할 수 있으며, 특권 작업은 특권 사용자만 할 수 있습니다. 특권과 권한 목록은 lssecattr 명령이나 getcmdattr 하위 명령으로 봅니다.
영어 원문
Attention RBAC users and Trusted AIX users: This command can perform privileged operations. Only privileged users can run privileged operations. For more information about authorizations and privileges, see Privileged Command Database in Security. For a list of privileges and the authorizations associated with this command, see the lssecattr command or the getcmdattr subcommand.
예제
| 명령 | 하는 일 |
|---|---|
ioo -L |
모든 조정 값의 현재·재부팅 값, 범위, 단위, 유형, 의존 관계 |
ioo -L j2_recoveryMode |
j2_recoveryMode의 현재·기본·재부팅 값, 범위, 단위, 유형 |
ioo -h j2_nPagesPerWriteBehindCluster |
j2_nPagesPerWriteBehindCluster의 도움말 |
ioo -r -o maxrandwrt=4 |
다음 재부팅 뒤 maxrandwrt를 4로 |
ioo -p -D |
모든 조정 값을 영구로 기본값으로 되돌림 |
ioo -r -a |
모든 조정 값의 재부팅 값 |
ioo -x |
모든 조정 값의 특성을 스프레드시트 형식으로 |
ioo -L j2_recoveryMode의 출력은 다음과 비슷합니다.
NAME CUR DEF BOOT MIN MAX UNIT TYPE
-----------------------------------------------------------------------
recoveryMode 1 1 1 0 1 n/a D
-----------------------------------------------------------------------
자주 쓰는 형태:
ioo -a | egrep "PageReadAhead|pgahead|RandomWrite|randwrt"
vmstat -v | grep -i "blocked with no"
ioo -p -o j2_maxPageReadAhead=256
관련 명령어: vmo, no, raso, tuncheck
영어 원문
- To list the current and reboot value, range, unit, type, and dependencies of all tunable parameters that are managed by the ioo command, enter the following command:
ioo -L
- To list the current, default, and reboot values, range, unit, and type of the
j2_recoveryModetunable parameter, enter the following command:
ioo -L j2_recoveryMode
The result might be similar to the following output:
NAME CUR DEF BOOT MIN MAX UNIT TYPE
-----------------------------------------------------------------------
recoveryMode 1 1 1 0 1 n/a D
-----------------------------------------------------------------------
- To display help information for the
j2_nPagesPerWriteBehindClustertunable parameter, enter the following command:
ioo -h j2_nPagesPerWriteBehindCluster
- To set maxrandwrt to 4 after the next reboot, enter the following command:
ioo -r -o maxrandwrt=4
- To permanently reset all ioo tunable parameters to default, enter the following command:
ioo -p -D
- To list the reboot value of all ioo parameters, enter the following command:
ioo -r -a
- To list (spreadsheet format) the current and reboot value, range, unit, type, and dependencies of all tunables parameters that are managed by the ioo command, enter the following command:
ioo -x
Related information:
- no command
- raso command
- tuncheck command
- Kernel Tuning
리눅스(GNU)와 다른 점
리눅스에서는 블록 장치 미리 읽기를 blockdev --setra나 /sys/block/<장치>/queue/read_ahead_kb로, 더티 페이지 내보내기를 sysctl vm.dirty_ratio·vm.dirty_background_ratio로, 비동기 I/O 최대 수를 fs.aio-max-nr로 조정합니다. AIX처럼 한 명령에 I/O 조정 값이 모여 있지 않고 sysctl과 sysfs로 흩어져 있습니다.