Solaris のシステム管理 (資源管理とネットワークサービス)

第 11 章 資源管理の構成例

この章では、資源管理のフレームワークについて考察し、仮想的なサーバー統合プロジェクトについて説明します。この例では、5 つのアプリケーションを 1 つのシステムに統合します。対象となるアプリケーションは、それぞれ資源要件、ユーザー数、およびアーキテクチャが異なります。

統合前の構成

現在、各アプリケーションは、それぞれの要件を満たす専用サーバーに置かれています。次の表にアプリケーションとその特性を示します。

アプリケーション 

特性 

アプリケーションサーバー 

2 CPU を超えるとスケーラビリティが低い 

アプリケーションサーバー用のデータベースインスタンス 

負荷の高いトランザクション処理 

テストおよび開発環境用のアプリケーションサーバー 

GUI ベースでのコードテスト 

トランザクション処理サーバー 

応答時間の保証 

スタンドアロンのデータベースインスタンス 

大量のトランザクション処理と、複数のタイムゾーンに対するサービスの提供 

統合後の構成

次の構成を使用して、アプリケーションを 1 つのシステムに統合します。

構成の作成

project データベースファイルを編集します。エントリを追加して必要な資源制御を実装し、ユーザーを資源プールにマップしたら、ファイルを表示します。


# cat /etc/project
.
.
.
user.app_server:2001:Production Application Server:::project.pool=appserver_pool
user.app_db:2002:App Server DB:::project.pool=db_pool,project.cpu-shares(privileged,1,deny)
development:2003:Test and development::staff:project.pool=dev_pool,
  process.max-address-space=(privileged,536870912,deny)
user.tp_engine:2004:Transaction Engine:::project.pool=tp_pool
user.geo_db:2005:EDI DB:::project.pool=db_pool,project.cpu-shares=(privileged,3,deny)
.
.
.

注 -

開発チームはタスクを開発プロジェクトで実行する必要があります。これは、このプロジェクトへのアクセスをユーザーのグループ ID (GID) で制限しているためです。


pool.host という名前で入力ファイルを作成し、必要な資源プールの構成に使用します。次に、ファイルを表示します。


# cat pool.host

create system host
create pset default_pset (uint pset.min = 1)
create pset dev_pset (uint pset.max = 2)
create pset tp_pset (uint pset.min = 2)
create pset db_pset (uint pset.min = 4; uint pset.max = 6)
create pset app_pset (uint pset.min = 1; uint pset.max = 2)
create pool default_pool (string pool.scheduler="TS"; boolean pool.default = true)
create pool dev_pool (string pool.scheduler="IA")
create pool appserver_pool (string pool.scheduler="TS")
create pool db_pool (string pool.scheduler="FSS")
create pool tp_pool (string pool.scheduler="TS")
associate pool default_pool (pset default_pset)
associate pool dev_pool (pset dev_pset)
associate pool appserver_pool (pset app_pset)
associate pool db_pool (pset db_pset)
associate pool tp_pool (pset tp_pset)

次のコマンドを入力します。


# poolcfg -f pool.host

構成をアクティブにします。


# pooladm -c

システム上でフレームワークが有効になっています。

構成の表示

フレームワークの構成を表示するには、次のコマンドを入力します。


# pooladm
system host
        int system.version 1
        boolean system.bind-default true
        string system.comment

        pool default_pool
                boolean pool.default true
                boolean pool.active true
                int pool.importance 1
                string pool.comment
                string pool.scheduler TS
                pset default_pset

        pool dev_pool
                boolean pool.default false
                boolean pool.active true
                int pool.importance 1
                string pool.comment
                string pool.scheduler IA
                pset dev_pset

        pool appserver_pool
                boolean pool.default false
                boolean pool.active true
                int pool.importance 1
                string pool.comment
                string pool.scheduler TS
                pset app_pset

        pool db_pool
                boolean pool.default false
                boolean pool.active true
                int pool.importance 1
                string pool.comment
                string pool.scheduler FSS
                pset db_pset

        pool tp_pool
                boolean pool.default false
                boolean pool.active true
                int pool.importance 1
                string pool.comment
                string pool.scheduler TS
                pset tp_pset

        pset default_pset
                int pset.sys_id -1
                string pset.units population
                boolean pset.default true
                uint pset.max 4294967295
                uint pset.min 1
                string pset.comment
                boolean pset.escapable false
                uint pset.load 0
                uint pset.size 0

        pset dev_pset
                int pset.sys_id 1
                string pset.units population
                boolean pset.default false
                uint pset.max 2
                uint pset.min 0
                string pset.comment
                boolean pset.escapable false
                uint pset.load 0
                uint pset.size 0

        pset tp_pset
                int pset.sys_id 2
                string pset.units population
                boolean pset.default false
                uint pset.max 4294967295
                uint pset.min 2
                string pset.comment
                boolean pset.escapable false
                uint pset.load 0
                uint pset.size 0

        pset db_pset
                int pset.sys_id 3
                string pset.units population
                boolean pset.default false
                uint pset.max 6
                uint pset.min 4
                string pset.comment
                boolean pset.escapable false
                uint pset.load 0
                uint pset.size 0

        pset app_pset
                int pset.sys_id 4
                string pset.units population
                boolean pset.default false
                uint pset.max 2
                uint pset.min 1
                string pset.comment
                boolean pset.escapable false
                uint pset.load 0
                uint pset.size 0

フレームワークのグラフィック表示が続きます。

図 11-1 サーバー統合の構成

この図は、仮定のサーバー構成を示しています。


注 -

上記の図の db_pool では、スタンドアロンのデータベースインスタンスに CPU 資源の 75% が保証されています。