[AIX 운영 체제와 장치 관리 46] WLM 클래스 — 수퍼클래스와 서브클래스, 클래스 속성(tier·inheritance·localshm·rset·io_priority), 자동·수동 클래스 할당과 보안
https://archive.horanglab.com/posts/aix-osdev-46
핵심 정리
- 클래스 이름은 16자까지 영문 대소문자, 숫자, 밑줄만 쓰며 서브클래스의 전체 이름은
Super.Sub형식입니다. 사용자 정의 수퍼클래스는 64개, 서브클래스는 61개까지입니다. - 미리 정의된 수퍼클래스는 Default(root가 아닌 미분류 프로세스), System(root 프로세스와 커널 메모리, 메모리 최소 1%), Shared(여러 수퍼클래스가 공유하는 페이지), Unclassified(WLM 시작 때 프로세스에 묶을 수 없던 메모리), Unmanaged(WLM이 관리하지 않는 고정 페이지)입니다.
- 등급(tier)은 0~9이고 0이 가장 높습니다. 낮은 등급은 높은 등급이 쓰지 않은 자원만 씁니다. 상속(inheritance)이 켜진 클래스의 프로세스는 exec 등으로 속성이 바뀌어도 다시 분류되지 않습니다.
- rules 파일 필드는 클래스 이름, 예약(-), 사용자, 그룹, 응용 프로그램, 형식(32bit·64bit·plock·fixed), 태그이며 위에서부터 처음 맞는 규칙이 적용되므로 순서가 아주 중요합니다.
- 수동 할당(wlmassign,
wlm_assign)은 자동 할당과 상속보다 우선하며, 바꾸거나 끝내려면 마지막 수동 할당을 한 사람과 같거나 높은 권한이 필요합니다.
| 항목 | 내용 |
|---|---|
| 버전 | AIX 6.1 (io_priority 속성이 더해짐) |
| 원문 | Operating system and device management — 5.3판 201209쪽, 6.1판 486493쪽 |
| 관련 명령어 | wlmassign, wlmcntrl -u, mkrset |
| 관련 파일·API | rules, classes, /etc/passwd, /etc/group, wlm_assign, wlm_set_tag |
WLM(Workload Manager)은 서비스 클래스를 정의하고 클래스마다 자원을 할당해 시스템 자원 할당을 제어하도록 돕습니다.
각 클래스에는 자원 권리와 다른 동작을 정하는 속성 집합이 있습니다. 시스템의 모든 프로세스는 서비스 클래스로 분류되므로 그 클래스의 자원 권리와 동작 강제를 받습니다. 프로세스는 수동 할당으로 직접, 또는 사용자 정의 분류 규칙에 따라 자동으로 클래스에 할당됩니다.
WLM은 수퍼클래스와 서브클래스라는 두 수준의 클래스를 지원합니다. 수퍼클래스는 쓸 수 있는 시스템 자원을 바탕으로 자원 권리를 받고, 서브클래스는 연결된 수퍼클래스의 권리에 상대적인 자원 권리를 받습니다. 선택적으로 서브클래스를 정의해 수퍼클래스 안 프로세스를 더 세밀하게 제어할 수 있습니다. 수퍼클래스에 adminuser나 admingroup을 지정해 서브클래스 정의 책임을 위임할 수도 있습니다.
수퍼클래스와 서브클래스 수준 모두에서 SMIT, Web-based System Manager, 명령행 인터페이스로 클래스, 자원 공유와 한계, 규칙을 정의할 수 있습니다. 응용 프로그램은 WLM API를 쓸 수 있습니다. 구성 정의는 WLM 속성 파일이라는 텍스트 파일 묶음에 보관됩니다.
클래스 이름은 16자까지이며 영문 대소문자, 숫자, 밑줄(_)만 쓸 수 있습니다. 한 WLM 구성 안에서 각 수퍼클래스 이름은 고유해야 합니다. 각 서브클래스 이름은 그 수퍼클래스 안에서 고유해야 하지만 다른 수퍼클래스의 서브클래스 이름과는 같아도 됩니다. 모든 서브클래스를 고유하게 식별하도록 서브클래스의 전체 이름은 수퍼클래스 이름과 서브클래스 이름을 점으로 이어 만듭니다. 예: Super.Sub
수퍼클래스
시스템 관리자는 수퍼클래스를 64개까지 정의할 수 있습니다.
그 밖에 다음 수퍼클래스 다섯 개가 자동으로 만들어집니다.
Default 수퍼클래스
기본 수퍼클래스이며 늘 정의돼 있습니다. 특정 수퍼클래스에 자동으로 할당되지 않은 root가 아닌 프로세스는 모두 Default 수퍼클래스에 할당됩니다. 특정 할당 규칙을 주어 다른 프로세스를 Default 수퍼클래스에 할당할 수도 있습니다.
System 수퍼클래스
규칙으로 특정 클래스에 할당되지 않은 모든 특권(root) 프로세스가 할당됩니다. 이 수퍼클래스는 커널 메모리 세그먼트와 커널 프로세스에 속한 메모리 페이지도 모읍니다. 이 수퍼클래스용 할당 규칙을 주어 다른 프로세스를 System 수퍼클래스에 할당할 수도 있습니다. 이 수퍼클래스의 메모리 최소 한계 기본값은 1%입니다.
Shared 수퍼클래스
둘 이상의 수퍼클래스 프로세스가 공유하는 메모리 페이지를 받습니다. 공유 메모리 영역의 페이지와 둘 이상의 수퍼클래스(또는 서로 다른 수퍼클래스의 서브클래스) 프로세스가 쓰는 파일의 페이지가 여기에 들어갑니다. 모두 한 수퍼클래스(또는 같은 수퍼클래스의 서브클래스)에 속한 여러 프로세스가 쓰는 공유 메모리와 파일은 그 수퍼클래스에 연결됩니다. 다른 수퍼클래스의 프로세스가 공유 메모리 영역이나 파일에 접근할 때만 페이지가 Shared 수퍼클래스에 놓입니다. 이 수퍼클래스에는 물리 메모리 공유와 한계만 적용할 수 있습니다. 다른 자원 형식의 공유나 한계, 서브클래스, 할당 규칙은 지정할 수 없습니다. 같은 수퍼클래스의 서로 다른 서브클래스 프로세스가 공유하는 메모리 세그먼트가 Shared 서브클래스로 분류될지, 원래 서브클래스에 남을지는 원래 서브클래스의 localshm 속성 값에 달려 있습니다.
Unclassified 수퍼클래스
분류되지 않은 프로세스용 메모리 할당입니다. WLM을 시작할 때 있던 프로세스는 읽어 들이는 WLM 구성의 할당 규칙에 따라 분류됩니다. 이 첫 분류 동안 각 프로세스에 붙은 모든 메모리 페이지는 프로세스가 속한 수퍼클래스(공유되지 않았거나 같은 수퍼클래스 프로세스끼리 공유할 때)나, 서로 다른 수퍼클래스 프로세스가 공유할 때는 Shared 수퍼클래스에 "부과"됩니다.
그러나 이 분류 시점에 어떤 프로세스에도(따라서 어떤 클래스에도) 직접 묶을 수 없는 페이지가 조금 있으며, 이 메모리는 Unclassified 수퍼클래스에 부과됩니다. 이 메모리 대부분은 WLM을 시작한 뒤 프로세스가 접근하거나, 풀렸다가 프로세스에 다시 할당되면서 시간이 지나며 바르게 다시 분류됩니다. Unclassified 수퍼클래스에는 프로세스가 없습니다. 이 수퍼클래스에는 물리 메모리 공유와 한계를 적용할 수 있습니다. 다른 자원 형식의 공유나 한계, 서브클래스, 할당 규칙은 지정할 수 없습니다.
Unmanaged 수퍼클래스
Unmanaged라는 특별한 수퍼클래스가 늘 정의돼 있습니다. 이 클래스에는 프로세스가 할당되지 않습니다. 이 클래스는 시스템에서 WLM이 관리하지 않는 모든 고정(pinned) 페이지의 메모리 사용량을 모읍니다. waitproc 프로세스의 CPU 사용률은 시스템이 100% 사용 중인 것처럼 보이지 않도록 어떤 클래스에도 모으지 않습니다. 이 수퍼클래스에는 어떤 자원 형식의 공유나 한계, 서브클래스, 할당 규칙도 지정할 수 없습니다.
서브클래스
시스템 관리자나 수퍼클래스 관리자는 서브클래스를 61개까지 정의할 수 있습니다.
그 밖에 특별한 서브클래스 Default와 Shared 두 개가 늘 정의돼 있습니다.
Default 서브클래스
기본 서브클래스이며 늘 정의돼 있습니다. 수퍼클래스의 특정 서브클래스에 자동으로 할당되지 않은 모든 프로세스는 Default 서브클래스에 할당됩니다. 특정 할당 규칙을 주어 다른 프로세스를 Default 서브클래스에 할당할 수도 있습니다.
Shared 서브클래스
수퍼클래스의 둘 이상의 서브클래스 프로세스가 쓰는 모든 메모리 페이지를 받습니다. 공유 메모리 영역의 페이지와 같은 수퍼클래스의 둘 이상의 서브클래스 프로세스가 쓰는 파일의 페이지가 들어갑니다. 모두 한 서브클래스에 속한 여러 프로세스가 쓰는 공유 메모리와 파일은 그 서브클래스에 연결됩니다. 같은 수퍼클래스의 다른 서브클래스 프로세스가 공유 메모리 영역이나 파일에 접근할 때만 페이지가 수퍼클래스의 Shared 서브클래스에 놓입니다. Shared 서브클래스에는 프로세스가 없습니다. 이 서브클래스에는 물리 메모리 공유와 한계만 적용할 수 있고, 다른 자원 형식의 공유나 한계, 할당 규칙은 지정할 수 없습니다. 같은 수퍼클래스의 서로 다른 서브클래스 프로세스가 공유하는 메모리 세그먼트가 Shared 서브클래스로 분류될지, 원래 서브클래스에 남을지는 원래 서브클래스의 localshm 속성 값에 달려 있습니다.
클래스 속성
WLM 클래스의 모든 속성을 나열합니다.
| 속성 | 설명 |
|---|---|
| Class Name(클래스 이름) | 16자까지이며 영문 대소문자, 숫자, 밑줄(_)만 쓸 수 있습니다. |
| Tier(등급) | 클래스 사이 자원 할당 우선순위를 정하는 0~9 사이 숫자입니다. |
| Inheritance(상속) | 자식 프로세스가 부모의 클래스 할당을 물려받을지 지정합니다. |
| localshm | 한 클래스에 속한 메모리 세그먼트가 Shared 클래스로 옮겨 가지 않게 합니다. |
| Administrator(adminuser, admingroup, authgroup) | (수퍼클래스만) 수퍼클래스 관리를 위임합니다. |
| Authorization(authuser, authgroup) | 프로세스를 클래스에 수동으로 할당할 권리를 위임합니다. |
| Resource Set(rset) | 클래스가 접근할 수 있는 자원을 CPU 면에서(프로세서 세트) 제한합니다. |
| delshm | 마지막으로 참조하던 프로세스가 가상 메모리 한계 때문에 죽으면 공유 메모리 세그먼트를 지웁니다. |
| vmenforce | 클래스가 가상 메모리 한계에 이르면 클래스의 모든 프로세스를 죽일지, 원인 프로세스만 죽일지 나타냅니다. |
io_priority |
클래스로 분류된 스레드가 낸 I/O 요청에 주는 우선순위입니다. 장치 수준에서 I/O 버퍼의 우선순위를 정하는 데 씁니다. 저장 장치가 I/O 우선순위를 지원하지 않으면 무시됩니다. 유효한 값은 0~15입니다. |
관련 개념
- 워크로드 관리를 위한 프로세스의 클래스 할당 — 프로세스는 시스템 관리자가 준 클래스 할당 규칙으로 클래스에 할당됩니다. 분류 기준은 사용자 ID, 그룹 ID, 응용 프로그램 파일 이름, 프로세스 형식, 응용 프로그램 태그 같은 프로세스 속성 집합의 값을 바탕으로 합니다.
등급(tier) 속성
등급은 WLM 클래스에 시스템 자원을 할당하는 순서를 나타냅니다.
관리자는 0부터 9까지 번호를 매긴 등급 10개까지에 클래스를 정의할 수 있으며 0이 가장 높은, 곧 가장 중요한 등급입니다. 등급 0이 쓸 수 있는 자원량은 쓸 수 있는 시스템 자원 전부입니다. 더 낮은(번호가 더 큰) 등급이 쓸 수 있는 자원량은 모든 높은 등급이 쓰지 않은 자원량입니다. 클래스의 목표 소비 비율은 그 등급의 활성 공유 수와 그 등급이 쓸 수 있는 자원량을 바탕으로 합니다. 늘 자원을 쓸 수 있도록 보장되는 등급은 등급 0뿐이므로 시스템 운영에 꼭 필요한 프로세스는 이 등급의 클래스로 분류하는 것이 좋습니다. 클래스에 등급 값을 지정하지 않으면 등급 0에 들어갑니다.
등급은 수퍼클래스와 서브클래스 수준 모두에 지정할 수 있습니다. 수퍼클래스 등급은 수퍼클래스 사이 자원 할당 우선순위를 지정하는 데 씁니다. 서브클래스 등급은 같은 수퍼클래스의 서브클래스 사이 자원 할당 우선순위를 지정하는 데 씁니다. 서로 다른 수퍼클래스의 하위 등급 사이에는 관계가 없습니다.
상속(inheritance) 속성
클래스의 상속 속성은 프로세스의 분류 속성 가운데 하나가 바뀔 때 클래스 안 프로세스를 자동으로 다시 분류할지 나타냅니다.
fork 서브루틴으로 새 프로세스를 만들면 상속이 켜졌든 아니든 부모의 클래스를 자동으로 물려받습니다. 한 가지 예외는 부모 프로세스에 태그가 있고, fork 때 태그 상속이 꺼져 있고, 부모 클래스의 클래스 상속이 꺼져 있는 경우입니다. 이 경우 자식 프로세스는 분류 규칙에 따라 다시 분류됩니다.
클래스에 상속이 켜져 있지 않으면 클래스 안 프로세스는 규칙에 쓰는 프로세스 속성을 바꾸는 서비스를 부른 뒤 분류 규칙에 따라 자동으로 분류됩니다. 그런 호출 가운데 가장 흔한 것은 exec 서브루틴이지만, setuid, setgid, plock, setpri, wlm_set_tag 같은 서브루틴도 분류를 바꿀 수 있습니다. 상속이 켜져 있으면 프로세스는 분류 규칙에 따른 재분류를 받지 않고 현재 클래스에 남습니다. 수동 할당은 상속보다 우선하므로 상속이 켜진 클래스의 프로세스를 다시 분류하는 데 쓸 수 있습니다.
상속 속성 값은 yes나 no입니다. 지정하지 않으면 클래스에 상속이 켜지지 않습니다.
이 속성은 수퍼클래스와 서브클래스 수준 모두에 지정할 수 있습니다. 주어진 수퍼클래스의 서브클래스에서는 다음과 같습니다.
- 수퍼클래스와 서브클래스 수준 모두 상속 속성이 yes이면 서브클래스 프로세스의 자식은 같은 서브클래스에 남습니다.
- 수퍼클래스는 yes, 서브클래스는 no(또는 지정 안 함)이면 서브클래스 프로세스의 자식은 같은 수퍼클래스에 남고 수퍼클래스의 할당 규칙에 따라 그 서브클래스 가운데 하나로 분류됩니다.
- 수퍼클래스는 no(또는 지정 안 함), 서브클래스는 yes이면 서브클래스 프로세스의 자식은 수퍼클래스 자동 할당 규칙을 받습니다.
- 규칙에 따라 같은 수퍼클래스로 분류되면 서브클래스에 남습니다(서브클래스 할당 규칙은 받지 않습니다).
- 수퍼클래스 규칙에 따라 다른 수퍼클래스로 분류되면 새 수퍼클래스의 서브클래스 할당 규칙을 적용해 새 수퍼클래스의 어느 서브클래스에 할당할지 정합니다.
- 수퍼클래스와 서브클래스 상속 속성이 모두 no(또는 지정 안 함)이면 서브클래스 프로세스의 자식은 표준 자동 할당을 받습니다.
localshm 속성
localshm 속성은 수퍼클래스와 서브클래스 수준에 지정할 수 있습니다.
localshm 속성은 한 클래스에 속한 메모리 세그먼트가 다른 클래스 프로세스의 접근을 받을 때 Shared 수퍼클래스나 서브클래스로 옮겨 가지 않게 하는 데 씁니다. 가능한 값은 yes나 no입니다. yes 값은 이 클래스의 공유 메모리 세그먼트가 클래스에 남아 알맞은 Shared 클래스로 옮겨 가지 않아야 한다는 뜻입니다. 속성을 지정하지 않으면 기본값은 no입니다.
메모리 세그먼트는 페이지 폴트 때 분류됩니다. 세그먼트를 만들면 Unclassified 수퍼클래스에 속한 것으로 표시됩니다. 세그먼트에 첫 페이지 폴트가 나면 폴트를 낸 프로세스와 같은 클래스로 분류됩니다. 나중에 세그먼트와 다른 클래스에 속한 프로세스가 이 세그먼트에서 페이지 폴트를 내면, WLM은 세그먼트를 알맞은 Shared 클래스(수퍼클래스나 서브클래스)로 다시 분류해야 할지 판단합니다. 폴트를 낸 프로세스와 세그먼트가 서로 다른 수퍼클래스에 속하면 다음 가운데 하나가 일어납니다.
- 세그먼트의 수퍼클래스에 localshm 속성이
yes이면 세그먼트는 현재 수퍼클래스에 남습니다. 세그먼트의 서브클래스에 localshm 속성이yes이면 세그먼트는 현재 서브클래스에 남습니다. 수퍼클래스 localshm 속성은yes이지만 서브클래스 속성은no이면 현재 수퍼클래스의 Shared 서브클래스로 갑니다. - 세그먼트의 수퍼클래스에 localshm 속성이
no이면 세그먼트는 Shared 수퍼클래스로 갑니다. 이것이 기본 동작입니다.
폴트를 낸 프로세스와 세그먼트가 같은 수퍼클래스의 서로 다른 서브클래스에 속하고 세그먼트의 서브클래스에 localshm 속성이 yes이면 세그먼트는 현재 클래스(수퍼클래스와 서브클래스)에 남습니다. 그렇지 않으면 세그먼트는 수퍼클래스의 Shared 서브클래스로 갑니다.
물론 폴트를 낸 프로세스와 세그먼트가 같은 클래스(같은 수퍼클래스와 같은 서브클래스)에 속하면 localshm 속성 값과 상관없이 세그먼트는 다시 분류되지 않습니다.
관리자(administrator) 속성
adminuser와 admingroup 속성은 수퍼클래스 관리를 사용자나 사용자 그룹에 위임하는 데 씁니다.
참고: 이 속성은 수퍼클래스에만 유효합니다.
adminuser 속성은 수퍼클래스 관리 작업 권한이 있는 사용자 이름(/etc/passwd에 나온 대로)을 지정합니다. admingroup 속성은 수퍼클래스 관리 작업 권한이 있는 사용자 그룹 이름(/etc/group에 나온 대로)을 지정합니다.
속성마다 값(사용자나 그룹)은 하나만 허용됩니다. 둘 가운데 하나, 아무것도 안 함, 둘 다 지정할 수 있습니다. 그 사용자나 그룹은 다음 권한을 가집니다.
- 서브클래스 만들기와 지우기
- 서브클래스의 속성, 자원 공유와 한계 바꾸기
- 서브클래스 할당 규칙 정의, 제거, 수정
- 수퍼클래스에 대해 활성 WLM 구성 새로 고치기(갱신)
권한(authorization) 속성
authuser와 authgroup 속성은 모든 클래스에 유효합니다. 프로세스를 클래스(수퍼클래스나 서브클래스)에 수동으로 할당할 권한이 있는 사용자나 그룹을 지정하는 데 씁니다.
프로세스(또는 프로세스 그룹)를 수퍼클래스에 수동으로 할당하면 수퍼클래스의 할당 규칙으로 각 프로세스를 수퍼클래스의 어느 서브클래스에 할당할지 정합니다.
속성마다 값(사용자나 그룹)은 하나만 허용됩니다. 둘 가운데 하나, 아무것도 안 함, 둘 다 지정할 수 있습니다.
자원 세트(resource set) 속성
자원 세트 속성(rset이라 함)은 어떤 클래스에도 지정할 수 있습니다. 값은 시스템 관리자가 정의한 자원 세트 이름입니다.
rset 속성은 시스템에서 쓸 수 있는 CPU 자원의 부분 집합(프로세서 세트)을 나타냅니다. 기본값은 "system"이며 시스템에서 쓸 수 있는 모든 CPU 자원에 접근하게 합니다. 유일한 제한은 서브클래스에 rset을 지정하면 그 세트의 CPU 집합이 수퍼클래스가 쓸 수 있는 CPU의 부분 집합이어야 한다는 점입니다. (자세한 내용은 mkrset 명령을 봅니다.)
참고: 등급 0이 아닌 클래스에 자원 세트를 할당할 때는 신중히 고려합니다. 낮은 등급은 높은 등급이 쓰지 않은 자원에만 접근하므로, 등급 0이 아닌 클래스를 시스템 CPU의 부분 집합으로 제한하면 그 CPU에 쓸 수 있는 CPU 시간이 없을 때 굶을 수 있습니다.
영어 원문
Classes
Workload Manager helps you control the allocation of system resources by defining classes of service and allocating resources to each of these classes.
Each class has a set of attributes that determine what its resource entitlements are, as well as other behaviors. Every process on the system is classified into a service class, and is thus subject to enforcement of the resource entitlements and behaviors for that class. Processes are assigned to a class either manually using manual assignment, or automatically according to user-defined classification rules.
WLM supports two levels of classes: superclasses and subclasses. Superclasses are given resource entitlements based on available system resources, and subclasses are given resource entitlements relative to the entitlements of their associated superclass. Optionally, you can define subclasses to allow for more granular control of the processes in a superclass. You can also delegate the responsibility of defining subclasses by specifying an adminuser or admingroup for a superclass.
For both the superclass and subclass levels, you can define classes, resource shares and limits, and rules using SMIT, Web-based System Manager, or the command-line interface. Applications can use the WLM APIs. Configuration definitions are kept in a set of text files called the WLM property files.
A class name is up to 16 characters in length and can contain only uppercase and lowercase letters, numbers and underscores (_). For a given WLM configuration, each superclass name must be unique. Each subclass name must be unique within that superclasses, but it can match subclass names in other superclasses. To uniquely identify every subclass, the full name of a subclass is composed of the superclass name and the subclass name separated by a dot; for example: Super.Sub.
Superclasses
The system administrator can define up to 64 superclasses.
In addition, the following five superclasses are automatically created:
Default superclass Is the default superclass and is always defined. All non-root processes that are not automatically assigned to a specific superclass are assigned to the Default superclass. Other processes can also be assigned to the Default superclass by providing specific assignment rules.
System superclass Has all privileged (root) processes assigned to it if those processes are not assigned by rules to a specific class. This superclass also collects the memory pages belonging to kernel memory segments and kernel processes. Other processes can also be assigned to the System superclass by providing specific assignment rules for this superclass. This superclass has a memory minimum limit of 1% as the default.
Shared superclass Receives the memory pages that are shared by processes in more than one superclass. This includes pages in shared memory regions and pages in files that are used by processes in more than one superclass (or in subclasses of different superclasses). Shared memory and files that are used by multiple processes that all belong to a single superclass (or subclasses of the same superclass) are associated with that superclass. Only when a process from a different superclass accesses the shared memory region or file are the pages placed in the Shared superclass. This superclass can have only physical memory shares and limits applied to it. It cannot have shares or limits for the other resource types, subclasses, or assignment rules specified. Whether a memory segment shared by processes in different subclasses of the same superclass is classified into the Shared subclass or remains in its original subclass depends on the value of the localshm attribute of the original subclass.
Unclassified superclass Is a memory allocation for unclassified processes. The processes in existence at the time that WLM is started are classified according to the assignment rules of the WLM configuration being loaded. During this initial classification, all the memory pages attached to each process are "charged" either to the superclass that the process belongs to (when not shared, or shared by processes in the same superclass), or to the Shared superclass when shared by processes in different superclasses.
However, a few pages cannot be directly tied to any processes (and thus to any class) at the time of this classification, and this memory is charged to the Unclassified superclass. Most of this memory is correctly reclassified over time, when it is either accessed by a process, or released and reallocated to a process after WLM is started. There are no processes in the Unclassified superclass. This superclass can have physical memory shares and limits applied to it. It cannot have shares or limits for the other resource types, subclasses, or assignment rules specified.
Unmanaged superclass A special superclass, named Unmanaged, is always defined. No processes are assigned to this class. This class accumulates the memory usage for all pinned pages in the system that are not managed by WLM. The CPU utilization for the waitproc processes is not accumulated in any class to prevent the system from appearing to be at 100% utilization. This superclass cannot have shares or limits for any resource types, subclasses, or specified assignment rules.
Subclasses
The system administrator or a superclass administrator can define up to 61 subclasses.
In addition, two special subclasses, Default and Shared, are always defined.
Default subclass Is the default subclass and is always defined. All processes that are not automatically assigned to a specific subclass of the superclass are assigned to the Default subclass. You can also assign other processes to the Default subclass by providing specific assignment rules.
Shared subclass Receives all the memory pages that are used by processes in more than one subclass of the superclass. Included are pages in shared memory regions and pages in files that are used by processes in more than one subclass of the same superclass. Shared memory and files that are used by multiple processes that all belong to a single subclass are associated with that subclass. Only when a process from a different subclass of the same superclass accesses the shared
memory region or file are the pages placed in the Shared subclass of the superclass. There are no processes in the Shared subclass. This subclass can have only physical memory shares and limits applied to it, and it cannot have shares or limits for the other resource types or assignment rules specified. Whether a memory segment shared by processes in different subclasses of the same superclass is classified into the Shared subclass or remains in its original subclass depends on the value of the localshm attribute of the original subclass.
Class attributes
List all the attributes of a WLM class.
Class Name
Can be up to 16 characters in length and can only contain uppercase and lowercase letters, numbers and underscores (_).
Tier A number between 0 and 9 used to prioritize resource allocation between classes.
Inheritance
Specifies whether a child process inherits the class assignment from its parent.
localshm
Prevents memory segments belonging to one class from migrating to Shared class.
Administrator (adminuser, admingroup, authgroup) (superclass only) Delegates the administration of a superclass.
Authorization (authuser, authgroup)
Delegates the right to manually assign a process to a class.
Resource Set (rset)
Limits the set of resources a given class has access to in terms of CPUs (processor set).
delshm
Deletes the shared memory segments if the last referencing process is killed due to the virtual memory limit.
vmeforce
Indicates whether to kill all processes in a class, or only the offending process, when a class reaches its virtual memory limit.
io_priority
Specifies the priority assigned to I/O requests issued by the threads classified to the class. This priority is used to prioritize I/O buffers at the device level. If the storage device does not support I/O priorities, the priority is ignored. Valid I/O priorities range from 0 to 15.
Related concepts
Process assignment to classes for workload management The processes are assigned to a class, using class-assignment rules provided by the system administrator. The classification criteria are based on the value of a set of attributes of the process such as user ID, group ID, name of the application file, type of process, and application tag.
Tier attribute:
Tiers represent the order in which system resources are allocated to WLM classes.
The administrator can define classes in up to 10 tiers, numbered 0 through 9, with 0 being the highest or most important tier. The amount of resources available to tier 0 is all available system resources. The amount of resources available to the lower (higher number) tiers, is the amount of resources that is unused by all higher tiers. Target consumption percentages for classes are based on the number of active shares in its tier, and the amount of resource available to the tier. Because tier 0 is the only tier that is
guaranteed to always have resources available to it, it is recommended that processes that are essential to system operation be classified in a class in this tier. If no tier value is specified for a class, it will be put in tier 0.
A tier can be specified at both the superclass and the subclass levels. Superclass tiers are used to specify resource allocation priority between superclasses. Subclass tiers are used to specify resource allocation priority between subclasses of the same superclass. There is no relationship among sub-tiers of different superclasses.
Inheritance attribute:
The inheritance attribute of a class indicates whether processes in the class should be automatically reclassified when one of the classification attributes of the process changes.
When a new process is created with the fork subroutine, it automatically inherits its parent's class, whether or not inheritance is enabled. One exception is when the parent process has a tag, has its inherit tag at fork set to off, and class inheritance is off for the parent's class. In this case, the child process is reclassified according to the classification rules.
When inheritance is not enabled for a class, any process in the class is automatically classified according to the classification rules after calling any service that changes a process attribute that is used in the rule. The most common of these calls is the exec subroutine, but other subroutines that can change classification include setuid, setgid, plock, setpri, and wlm_set_tag. When inheritance is enabled, the process is not subject to reclassification based on the classification rules, and will remain in its current class. Manual assignment has priority over inheritance and can be used to reclassify processes that are in a class with inheritance enabled.
The specified value for the inheritance attribute can be either yes or no. If unspecified, inheritance will not be enabled for a class.
This attribute can be specified at both superclass and subclass level. For a subclass of a given superclass:
If the inheritance attribute is set to yes at both the superclass and the subclass levels, a child of a process in the subclass will remain in the same subclass.
If the inheritance attribute is set to yes for the superclass and no (or unspecified) for the subclass, a child of a process in the subclass will remain in the same superclass and will be classified in one of its subclasses according to the assignment rules for the superclass.
If the inheritance attribute is no (or is unspecified) for the superclass and is set to yes for the subclass, a child of a process in the subclass will be submitted to the automatic assignment rules for the superclasses. – If the process is classified by the rules in the same superclass, then it will remain in the subclass (it will not be submitted to the subclass's assignment rules). – If the process is classified by the superclass's rules in a different superclass, then the subclass assignment rules of the new superclass are applied to determine the subclass of the new superclass the process will be assigned to.
If both superclass and subclass inheritance attributes are set to no (or are unspecified), then a child of a process in the subclass will be submitted to the standard automatic assignment.
localshm attribute:
The localshm attribute can be specified at the superclass and the subclass levels.
The localshm attribute is used to prevent memory segments belonging to one class from migrating to the Shared superclass or subclass when accessed by processes in other classes. The possible values for the
attribute are yes or no. A value of yes means that shared memory segments in this class must remain local to the class and not migrate to the appropriate Shared class. A value of no is the default when the attribute is not specified.
Memory segments are classified on page faults. When a segment is created, it is marked as belonging to the Unclassified superclass. On the first page fault on the segment, this segment is classified into the same class as the faulting process. If, later on, a process belonging to a different class than the segment page faults on this segment, WLM considers whether the segment needs to be reclassified into the appropriate Shared class (superclass or subclass). If the faulting process and the segment belong to different superclasses, one of the following occurs:
If the segment's superclass has the localshm attribute set to
yes, the segment remains in its current superclass. If the segment's subclass has the localshm attribute set toyes, the segment remains in its current subclass. If the superclass localshm attribute is set toyesbut its subclass attribute is set tono, it goes into the Shared subclass of the current superclass.If the segment's superclass has the localshm attribute set to
no, the segment goes to Shared superclass. This is the default action.
If the faulting process and the segment belong to different subclasses of the same superclass, and the segment's subclass has the localshm attribute set to yes, the segment remains in the current class (superclass and subclass). Otherwise, the segment goes to the Shared subclass of the superclass.
Of course, if the faulting process and the segment belong to the same class (same superclass and same subclass), the segment is not reclassified regardless of the values of the localshm attributes.
Administrator attribute:
The adminuser and admingroup attributes are used to delegate the superclass administration to a user or group of users.
Note: These attributes are valid only for superclasses.
The adminuser attribute specifies the name of the user (as listed in /etc/passwd) authorized to perform administration tasks on the superclass. The admingroup attribute specifies the name of the group of users (as listed in /etc/group) authorized to perform administration tasks on the superclass.
Only one value (user or group) is allowed for each attribute. Either of them, none, or both can be specified. The user or group will have authority to do the following:
Create and delete subclasses.
Change the attributes and resource shares and limits for the subclasses.
Define, remove or modify subclass assignment rules.
Refresh (update) the active WLM configuration for the superclass.
Authorization attribute:
The authuser and authgroup attributes are valid for all classes. They are used to specify the user or group authorized to manually assign processes to the class (superclass or subclass).
When manually assigning a process (or a group of processes) to a superclass, the assignment rules for the superclass are used to determine to which subclass of the superclass each process will be assigned.
Only one value (user or group) is allowed for each attribute. Either of them, none, or both can be specified.
Resource set attribute:
The resource set attribute (called rset) can be specified for any class. Its value is the name of a resource set defined by the system administrator.
The rset attribute represents a subset of the CPU resource available on the system (processor set). The default is "system," which gives access to all the CPU resources available on the system. The only restriction is that if an rset is specified for a subclass, the set of CPUs in the the set must be a subset of the CPUs available to the superclass. (For detailed information, see the mkrset command.
Note: Carefully consider assigning resource sets to any class that is not in tier 0. Because lower tiers only have access to the resources that are unused by the higher tiers, restricting a non-tier-0 class to a subset of the CPUs on the system could result in starvation if there is no CPU time available on those CPUs.
워크로드 관리자의 프로세스 분류
WLM에서 프로세스는 두 가지 방법 가운데 하나로 분류됩니다.
- 프로세스 분류 속성이 바뀌면 할당 규칙으로 프로세스를 자동으로 할당합니다. WLM이 능동 모드로 실행 중이면 이 자동 할당은 늘 적용됩니다(끌 수 없습니다). 프로세스를 분류하는 가장 흔한 방법입니다.
- 프로세스와 대상 클래스 모두에 필요한 권한이 있는 사용자는 고른 프로세스나 프로세스 그룹을 클래스에 수동으로 할당할 수 있습니다. 수동 할당은 직접 또는 SMIT나 Web-based System Manager를 거쳐 부를 수 있는 WLM 명령으로, 또는 WLM API(Application Programming Interface) 함수를 쓰는 응용 프로그램으로 할 수 있습니다. 이 수동 할당은 자동 할당과 상속보다 우선합니다.
워크로드 관리자의 자동 클래스 할당
프로세스의 클래스 자동 할당은 WLM 관리자가 지정한 클래스 할당 규칙 집합을 씁니다.
할당 규칙에는 두 수준이 있습니다.
- WLM 구성 수준의 할당 규칙 집합으로 프로세스를 어느 수퍼클래스에 할당할지 정합니다.
- 서브클래스가 정의된 각 수퍼클래스에는 다시 할당 규칙 집합이 있어 프로세스를 수퍼클래스의 어느 서브클래스에 할당할지 정합니다.
두 수준의 할당 규칙 모두 프로세스 속성 집합의 값을 바탕으로 합니다. 속성은 다음과 같습니다.
- 프로세스 사용자 ID
- 프로세스 그룹 ID
- 실행한 응용 프로그램(프로그램)의 경로 이름
- 프로세스 형식(예:
32bit나64bit) - 프로세스 태그
태그는 문자열로 정의되는 프로세스 속성으로, 응용 프로그램이 WLM API로 프로그램에서 설정할 수 있습니다.
분류는 속성이 바뀔 때마다 이 프로세스 속성 값을 클래스 할당 규칙 파일(rules)에 주어진 가능한 값 목록과 비교해 합니다. 비교로 현재 프로세스 속성 값에 맞는 규칙을 정합니다.
클래스 할당 규칙은 하나 이상의 공백으로 구분한 다음 필드를 담은 텍스트 문자열입니다.
| 필드 | 설명 |
|---|---|
| Name(이름) | rules 파일 수준(수퍼클래스나 서브클래스)에 맞는 클래스 파일에 정의된 클래스 이름이어야 합니다. 클래스 이름은 영문 대소문자, 숫자, 밑줄만 쓸 수 있고 16자까지입니다. 시스템 정의 클래스 Unclassified, Unmanaged, Shared에는 할당 규칙을 지정할 수 없습니다. |
| Reserved(예약) | 앞으로의 확장용입니다. 값은 하이픈(-)이어야 하며 반드시 있어야 합니다. |
| User(사용자) | 하이픈(-)이나 (/etc/passwd 파일에 정의된) 유효한 사용자 이름을 하나 이상 담습니다. 목록은 쉼표(,)로 구분한 이름 하나 이상입니다. 이름 앞에 느낌표(!)를 붙여 그 사용자를 클래스에서 제외할 수 있습니다. Korn 셸 패턴 일치 구문 전체로 사용자 이름 집합에 맞는 패턴을 지정할 수 있습니다. 유효한 사용자 이름이 없으면 규칙은 무시됩니다. |
| Group(그룹) | 하이픈(-)이나 (/etc/group 파일에 정의된) 유효한 그룹 이름을 하나 이상 담습니다. 목록은 쉼표(,)로 구분한 이름 하나 이상입니다. 이름 앞에 느낌표(!)를 붙여 그 그룹을 클래스에서 제외할 수 있습니다. Korn 셸 패턴 일치 구문 전체로 그룹 이름 집합에 맞는 패턴을 지정할 수 있습니다. 유효한 그룹 이름이 없으면 규칙은 무시됩니다. |
| Application(응용 프로그램) | 하이픈(-)이나 응용 프로그램 경로 이름 목록을 담습니다. 클래스에 포함되는 프로세스가 실행하는 응용 프로그램(프로그램)의 경로 이름입니다. 응용 프로그램 이름은 전체 경로 이름이거나 경로 이름에 맞는 Korn 셸 패턴입니다. 목록은 쉼표(,)로 구분한 경로 이름 하나 이상입니다. 이름 앞에 느낌표(!)를 붙여 그 응용 프로그램을 제외할 수 있습니다. 목록 가운데 적어도 응용 프로그램 하나는 읽어 들일 때 찾을 수 있어야 하며, 그렇지 않으면 규칙은 무시됩니다. 이 때문에 처음에 무시된 규칙은 목록의 응용 프로그램이 든 파일 시스템이 나중에 마운트되면 유효해질 수 있습니다. |
| Type(형식) | 하이픈(-)이나 프로세스 속성 목록을 담습니다. 가능한 값은 32bit(32비트 프로세스), 64bit(64비트 프로세스), plock(plock 서브루틴을 불러 메모리를 고정한 프로세스), fixed(고정 우선순위 프로세스, SCHED_FIFO나 SCHED_RR)입니다. fixed 형식은 분류 용도로만 씁니다. WLM은 고정 우선순위 프로세스나 스레드의 프로세서 사용을 조절하지 않습니다. 고정 우선순위 프로세스는 클래스 안 다른 프로세스를 굶길 수 있으므로 이런 작업을 격리하도록 이 분류 속성을 제공합니다. 이런 프로세스의 소비를 보고하는 데도 쓸 수 있습니다. 형식 필드 값은 위 속성 하나 이상을 더하기(+)로 이은 조합일 수 있습니다. 32bit와 64bit 값은 서로 배타적입니다. |
| Tag(태그) | 하이픈(-)이나 응용 프로그램 태그 목록을 담을 수 있습니다. 응용 프로그램 태그는 30자까지의 영숫자 문자열입니다. 목록은 쉼표로 구분한 응용 프로그램 태그 값 하나 이상입니다. |
User, Group, Application, Tag 속성은 속성 값 그룹일 수 있습니다.
프로세스를 만들면(fork) 부모와 같은 클래스에 남습니다. 재분류는 새 프로세스가 분류에 쓰는 프로세스 속성 가운데 하나를 바꿀 수 있는 시스템 호출을 낼 때 일어납니다. 예를 들어 exec, setuid(와 관련 호출), setgid(와 관련 호출), setpri, plock입니다.
프로세스를 분류하려고 WLM은 활성 구성의 최상위 rules 파일을 살펴 프로세스가 속할 수퍼클래스를 정합니다. 파일 안 규칙마다 WLM은 프로세스 속성의 현재 값을 규칙에 지정한 값과 값 목록에 비교합니다. 규칙은 파일에 나온 순서대로 확인합니다. 맞는 것을 찾으면 프로세스를 규칙 첫 필드에 이름이 나온 수퍼클래스에 할당합니다. 그런 다음 수퍼클래스의 rules 파일을 같은 방식으로 살펴 프로세스를 어느 서브클래스에 할당할지 정합니다.
프로세스가 규칙 가운데 하나에 맞으려면 각 속성이 규칙의 해당 필드와 맞아야 합니다. 다음은 속성 값이 rules 파일 필드의 값과 맞는지 정하는 기준 목록입니다.
- rules 파일의 필드 값이 하이픈(-)이면 해당 프로세스 속성의 어떤 값이든 맞습니다.
- type을 뺀 모든 속성에서, 프로세스 속성 값이 rules 파일 목록 가운데 제외되지 않은("!"가 앞에 붙지 않은) 값 하나와 맞으면 일치한 것입니다.
- type 속성에서, 규칙의 값 가운데 하나가 더하기(+)로 이은 값 둘 이상으로 이루어져 있으면 프로세스 특성이 그 값을 모두 만족할 때만 맞습니다.
수퍼클래스와 서브클래스 수준 모두에서 WLM은 rules 파일에 나온 순서대로 규칙을 훑어, 프로세스가 맞는 첫 규칙에 해당하는 클래스로 프로세스를 분류합니다. 따라서 rules 파일 안 규칙 순서가 아주 중요합니다. rules 파일을 만들거나 고칠 때 조심합니다.
워크로드 관리자의 수동 클래스 할당
Web-based System Manager, SMIT, wlmassign 명령으로 프로세스나 프로세스 그룹을 수퍼클래스나 서브클래스, 또는 둘 다에 수동으로 할당할 수 있습니다.
자세한 내용은 wlmassign을 봅니다. 응용 프로그램은 wlm_assign API 함수로 프로세스를 할당할 수 있습니다.
프로세스를 클래스에 수동으로 할당하거나 기존 수동 할당을 취소하려면 사용자에게 알맞은 수준의 특권이 있어야 합니다. 수동 할당은 수퍼클래스 수준, 서브클래스 수준, 또는 둘 다에서 따로 하거나 취소할 수 있습니다. 이 할당은 프로그래밍 인터페이스에서는 플래그로, WLM 관리 도구가 쓰는 명령행 인터페이스에서는 옵션 집합으로 지정합니다. 그래서 프로세스를 수퍼클래스에만, 서브클래스에만, 또는 수퍼클래스와 그 수퍼클래스의 서브클래스에 수동으로 할당할 수 있습니다. 마지막 경우 이중 할당은 (명령 하나나 API 호출 하나로) 동시에, 또는 서로 다른 때에 서로 다른 사용자가 할 수 있습니다.
할당은 아주 유연하지만 헷갈릴 수 있습니다. 다음은 가능한 경우의 두 가지 예입니다.
예 1: 프로세스의 첫 할당
시스템 관리자가 Process1을 superclassA에서 superclassB로 수동 할당합니다(수퍼클래스 수준만 할당). WLM은 superclassB의 서브클래스 자동 할당 규칙으로 프로세스를 최종적으로 어느 서브클래스에 할당할지 정합니다. Process1은 superclassB.subclassA에 할당되고 "수퍼클래스만" 할당으로 표시됩니다.
알맞은 특권이 있는 사용자가 Process2를 현재 클래스 superclassA.subclassA에서 같은 수퍼클래스의 새 서브클래스 superclassA.subclassB로 할당합니다. Process2는 새 서브클래스에 할당되고 "서브클래스만" 할당으로 표시됩니다.
superclassB 서브클래스의 WLM 관리자가 Process1을 superclassB의 또 다른 서브클래스인 subclassC로 수동 재할당합니다. Process1은 superclassB.subclassC로 다시 분류되고 이제 수퍼클래스와 서브클래스 수준 할당을 모두 가진 것으로 표시됩니다.
예 2: 수동 할당의 재할당이나 취소
서브클래스 수준 수동 할당의 재할당과 취소는 덜 복잡하며 서브클래스 수준 할당에만 영향을 줍니다.
시스템 관리자가 Process2를 자원이 더 많은 수퍼클래스에 두고 싶어 Process2를 superclassC에 수동 할당하기로 했다고 합시다. 예 1에서 Process2는 superclassA의 subclassB에 "서브클래스만" 할당으로 수동 할당됐습니다. Process2가 다른 수퍼클래스에 할당되므로 이전 수동 할당은 의미가 없어져 취소됩니다. Process2는 이제 superclassC에 "수퍼클래스만" 수동 할당을 가지며, 상속이 없으면 자동 할당 규칙으로 superclassC의 서브클래스에 할당됩니다.
이제 시스템 관리자가 Process1의 superclassB 수동 할당을 끝내기로 합니다. Process1의 "수퍼클래스 수준" 수동 할당이 취소되고, 상속이 없으면 Process1은 최상위 자동 할당 규칙으로 수퍼클래스를 할당받습니다.
규칙이 바뀌지 않았다면 Process1은 superclassA에 할당되고, superclassB.subclassC로의 서브클래스 수준 수동 할당은 의미가 없어져 취소됩니다.
어떤 이유로 최상위 규칙이 Process1을 superclassB에 할당하면 superclassB.subclassC로의 서브클래스 수준 할당은 여전히 유효하며 계속 적용됩니다. Process1은 이제 "서브클래스만" 수동 할당을 가집니다.
워크로드 관리자 갱신
(wlmcntrl -u 명령으로) WLM을 갱신하면 갱신한 구성이 새 분류 규칙 집합을 읽을 수 있습니다.
그러면 프로세스가 새 규칙으로 다시 분류되는 일이 많습니다. WLM은 수동으로 할당됐거나 상속이 켜진 클래스에 있는 프로세스는, 그 클래스가 새 구성에 없지 않은 한 다시 분류하지 않습니다.
워크로드 관리자의 보안 고려 사항
프로세스를 클래스에 할당하거나 이전 수동 할당을 취소하려면 사용자에게 프로세스와 대상 클래스 모두에 대한 권한이 있어야 합니다.
이 제약은 다음 규칙이 됩니다.
- root 사용자는 어떤 프로세스든 어떤 클래스에든 할당할 수 있습니다.
- 주어진 수퍼클래스의 서브클래스에 관리 특권이 있는 사용자(곧 사용자나 그룹 이름이 수퍼클래스의 adminuser, admingroup 속성에 지정한 이름과 맞는 사용자)는 이 수퍼클래스의 한 서브클래스에 있는 어떤 프로세스든 같은 수퍼클래스의 다른 서브클래스로 수동 재할당할 수 있습니다.
- 사용자는 자기 프로세스(같은 실제 또는 유효 사용자 ID에 연결된 프로세스)를 수동 할당 특권이 있는 서브클래스(곧 사용자나 그룹 이름이 수퍼클래스나 서브클래스의 authuser, authgroup 속성에 지정한 이름과 맞는 서브클래스)에 수동으로 할당할 수 있습니다.
수동 할당을 바꾸거나 끝내려면 사용자에게 마지막 수동 할당을 한 사람과 적어도 같은 수준의 특권이 있어야 합니다.
영어 원문
Process classifications in Workload Manager
In WLM, processes can be classified in either of two ways.
A process is automatically assigned using assignment rules when process classification attributes change. When WLM is running in active mode, this automatic assignment is always in effect (it cannot be turned off). This is the most common way that processes are classified.
A selected process or group of processes can be manually assigned to a class by a user with the required authority on both the processes and the target class. Manual assignment can be done using by a WLM command, which could be invoked directly or through SMIT or Web-based System Manager, or by an application using a function of the WLM Application Programming Interface. This manual assignment overrides the automatic assignment and inheritance.
Automatic class assignment in Workload Manager
The automatic assignment of processes to classes uses a set of class-assignment rules specified by a WLM administrator.
There are two levels of assignment rules:
A set of assignment rules at the WLM configuration level used to determine which superclass a given process is assigned to.
Each superclass with subclasses defined, in turn has a set of assignment rules used to determine which subclass of the superclass the process is assigned to.
The assignment rules at both levels are based on the values of a set of process attributes. These attributes are as follows:
Process user ID
Process group ID
Path name of the application (program) executed
Type of the process (
32bitor64bit, for example)Process tag.
The tag is a process attribute, defined as a character string, that an application can set by program, using the WLM API.
The classification is done whenever an attribute changes by comparing the value of these process attributes against lists of possible values given in the class assignment rules file (called rules). The comparison determines which rule is a match for the current value of the process attributes.
A class assignment rule is a text string that includes the following fields, separated by one or more spaces:
- Name — Must contain the name of a class which is defined in the class file corresponding to the level of the
rulesfile (superclass or subclass). Class names can contain only uppercase and lowercase letters, numbers, and underscores and can be up to 16 characters in length. No assignment rule can be specified for the system defined classes Unclassified, Unmanaged and Shared. - Reserved — Reserved for future extension. Its value must be a hyphen (-), and it must be present.
- User — Can contain either a hyphen (-) or at least one valid user name (as defined in the
/etc/passwdfile). The list is composed of one or more names, separated by a comma (,). An exclamation mark (!) can be used before a name to exclude a given user from the class. Patterns can be specified to match a set of user names, using full Korn shell pattern-matching syntax. If there are no valid user names, the rule is ignored. - Group — Can contain either a hyphen (-) or at least one valid group name (as defined in the
/etc/groupfile). The list is composed of one or more names, separated by a comma (,). An exclamation mark (!) can be used before a name to exclude a given group from the class. Patterns can be specified to match a set of group names using full Korn shell pattern matching syntax. If there are no valid group names, the rule is ignored. - Application — Can contain either a hyphen (-) or a list of application path names. This is the path name of the applications (programs) executed by processes included in the class. The application names will be either full path names or Korn shell patterns that match path names. The list is composed of one or more path names, separated by a comma (,). An exclamation mark (!) can be used before a name to exclude a given application. At least one application in the list must be found at load time or the rule is ignored. Rules that are initially ignored for this reason might become effective later on if a file system is mounted that contains one or more applications in the list.
- Type — Can contain either a hyphen (-) or a list of process attributes. The possible values for these attributes are: • 32bit: the process is a 32-bit process • 64bit: the process is a 64-bit process • plock: the process called the plock subroutine to pin memory • fixed: the process is a fixed priority process (
SCHED_FIFOorSCHED_RR) The fixed type is for classification purposes only. WLM does not regulate the processor use of fixed priority processes or threads. Because fixed priority processes have the potential to cause deprivation among other processes in a class, this classification attribute is provided to allow isolation of these jobs. This attribute can also be used to report consumption of such processes. The value of the type field can be a combination of one or more of the above attributes separated by a plus (+). The 32bit and 64bit values are mutually exclusive. - Tag — May contain either a hyphen (-) or a list of application tags. An application tag is a string of up to 30 alphanumeric characters. The list is composed of one or more application tag values separated by commas.
The User, Group, Application, and Tag attributes can be an attribute value grouping.
When a process is created (fork), it remains in the same class as its parent. Reclassification happens when the new process issues a system call which can modify one of the attributes of the process used for classification; for example, exec, setuid (and related calls), setgid (and related calls), setpri and plock.
To classify the process, WLM examines the top-level rules file for the active configuration to determine which superclass the process belongs. For each rule in the file, WLM checks the current values for the process attributes against the values and lists of values specified in the rule. Rules are checked in the order that they appear in the file. When a match is found, the process is assigned to the superclass named in the first field of the rule. Then the rules file for the superclass is examined in the same way to determine to which subclass the process should be assigned.
For a process to match one of the rules, each of its attributes must match the corresponding field in the rule. The following is a list of the criteria used to determine whether the value of an attribute matches the values in the field of the rules file:
If the field in the rules file has a value of hyphen (-), then any value of the corresponding process attribute is a match.
For all the attributes except type, if the value of the process attribute matches one of the values in the list in the rules file that is not excluded (prefaced by a "!"), then a match has occurred.
For the type attribute, if one of the values in the rule is comprised of two or more values separated by a plus (+), then a process is a match only if its characteristics match all the values.
At both superclass and subclass levels, WLM goes through the rules in the order in which they appear in the rules file, and classifies the process in the class corresponding to the first rule for which the process is a match. The order of the rules in the rules file is therefore extremely important. Use caution when you create or modify the rules file.
Manual class assignment in Workload Manager
A process or a group of processes can be manually assigned to a superclass and/or subclass by using Web-based System Manager, SMIT, or the wlmassign command.
See wlmassign for more information. An application can assign processes through the wlm_assign API function.
To manually assign processes to a class or to cancel an existing manual assignment, a user must have the appropriate level of privilege. A manual assignment can be made or canceled separately at the superclass level, the subclass level, or both. This assignment is specified by flags for the programming interface and a set of options for the command line interface used by the WLM administration tools. So, a process can be manually assigned to a superclass only, a subclass only, or to a superclass and a subclass of that superclass. In the latter case, the dual assignment can be done simultaneously (with a single command or API call) or at different times, by different users.
Assignment is very flexible, but can be confusing. Following are two examples of the possible cases.
Example 1: First Assignment of Processes
A system administrator manually assigns Process1 from superclassA to superclassB (superclass-level-only assignment). The automatic assignment rules for the subclasses of superclassB are used by WLM to determine to which subclass the process is ultimately assigned. Process1 is assigned to superclassB.subclassA and is flagged as having a "superclass only" assignment.
A user with the appropriate privileges assigns Process2 from its current class superclassA.subclassA to a new subclass of the same superclass, superclassA.subclassB. Process2 is assigned to its new subclass and flagged as having a "subclass only" assignment.
A WLM administrator of the subclasses of superclassB manually reassigns Process1 to subclassC, which is another subclass of superclassB. Process1 is reclassified into superclassB.subclassC and is now flagged as having both superclass and subclass level assignment.
Example 2: Reassignment or Cancelation of Manual Assignment
The reassignment and cancelation of a manual assignment at the subclass level is less complex and affects only the subclass level assignment.
Suppose that the system administrator wants Process2 to be in a superclass with more resources and decides to manually assign Process2 to superclassC. In Example 1, Process2 was manually assigned to subclassB of superclassA, with a "subclass only" assignment. Because Process2 is assigned to a different superclass, the previous manual assignment becomes meaningless and is canceled. Process2 now has a "superclass only" manual assignment to superclassC, and in the absence of inheritance, is assigned to a subclass of superclassC using the automatic assignment rules.
Now, the system administrator decides to terminate the manual assignment from Process1 to superclassB. The "superclass level" manual assignment of Process1 is canceled, and in the absence of inheritance, Process1 is assigned a superclass using the top level automatic assignment rules.
If the rules have not changed, Process1 is assigned to superclassA, and its subclass level manual assignment to superclassB.subclassC becomes meaningless and is canceled.
If for some reason the top level rules assign Process1 to superclassB, then the subclass level assignment to superclassB.subclassC is still valid and remains in effect. Process1 now has a "subclass only" manual assignment.
Updates to the Workload Manager:
When WLM is updated (with the wlmcntrl -u command), the updated configuration can load a new set of classification rules.
When this happens, processes are often reclassified using the new rules. WLM does not reclassify processes that have been manually assigned or that are in a class with inheritance enabled, unless their class does not exist in the new configuration.
Security considerations for Workload Manager:
To assign a process to a class or to cancel a prior manual assignment, the user must have authority both on the process and on the target class.
These constraints translate into the following rules:
The root user can assign any process to any class.
A user with administration privileges on the subclasses of a given superclass (that is, the user or group name matches the user or group names specified in the attributes adminuser and admingroup of the superclass) can manually reassign any process from one of the subclasses of this superclass to another subclass of the superclass.
Users can manually assign their own processes (ones associated with the same real or effective user ID) to a subclass for which they have manual assignment privileges (that is, the user or group name matches the user or group names specified in the attributes authuser and authgroup of the superclass or subclass).
To modify or terminate a manual assignment, users must have at least the same level of privilege as the person who issued the last manual assignment.