運用に関する推奨事項

このセクションでは、大規模な展開に関する広範な推奨事項について説明します。

常に小規模な展開から開始して徐々にスケールアップします。スケール時にはサーバを監視し、問題を早期に特定します。

1. Saltクライアントのオンボーディング速度

SUSE Managerがクライアントをオンボーディングできる速度には限りがあり、ハードウェアリソースによって変わります。SUSE Managerが設定されている速度よりも速くクライアントをオンボーディングすると、未処理のキーのバックログが増加します。これによって処理速度が低下し、リソースが枯渇する可能性があります。キーの受け入れ速度をプログラムで制限することをお勧めします。開始点としては15秒間隔でクライアントをオンボーディングするのが安全です。これは次のコマンドで実行できます。

for k in $(salt-key -l un|grep -v Unaccepted); do salt-key -y -a $k; sleep 15; done

2. SaltクライアントとRNG

Saltクライアントとの通信はすべて暗号化されます。クライアントのオンボーディング時にSaltは非対称暗号を使用します。このためには、カーネル内で乱数ジェネレータ (RNG)機能からエントロピが利用可能である必要があります。十分なエントロピがRNGから利用できない場合、通信が大幅に低速化します。これは特に仮想化環境に当てはまります。十分なエントロピが存在することを確認するか、仮想化ホストのオプションを変更してください。

利用可能なエントロピの量は、cat /proc/sys/kernel/random/entropy_availで確認できます。この量が100~200を下回ってはなりません。

3. 受け入れられていないSaltキーで実行されるクライアント

オンボーディングされていないアイドル状態のクライアント、すなわち受け入れられていないSaltキーで実行されているクライアントは、オンボーディングされているアイドル状態のクライアントよりも多くのリソースを消費します。一般的には、クライアントあたり約2.5 Kb/秒、受信ネットワーク帯域幅を余分に消費します。たとえば、1000個のアイドル状態のクライアントは、約2.5 Mb/秒を余分に消費します。すべてのクライアントでオンボーディングが完了すると、この消費量はほぼゼロにまで減ります。最適なパフォーマンスを得るには、オンボーディングされていないクライアントの数を制限します。

4. Salt Mineの無効化

以前のバージョンでは、SUSE ManagerはSalt mineというツールを使用してクライアントの利用可否を確認していました。Salt mineでは、クライアントが1時間ごとにサーバに接続するため、多大な負荷が発生していました。SUSE Manager 3.2ではより効率的なメカニズムが導入されたため、Salt mineは必要なくなりました。代わりに、SUSE ManagerサーバはTaskomaticを使用して、12時間以上オフラインになっていると思われるクライアントに対してのみpingを送信し、デフォルトで少なくとも24時間ごとに1回、すべてのクライアントに接続します。これを調整するには、rhn.confweb.system_checkin_thresholdパラメータを調整します。この値は日単位で、デフォルト値は1です。

新しく登録されたSaltクライアントでは、Salt mineはデフォルトで無効になっています。ご使用のシステムでSalt mineが実行されている場合は、無効にすると負荷を削減できます。これは特に、大量のクライアントがある場合に効果的です。

サーバで次のコマンドを実行してSalt mineを無効にします。

salt '*' state.sls util.mgr_mine_config_clean_up

クライアントが再起動され、Saltイベントがいくつか生成されてサーバで処理されます。大量のクライアントがある場合は、これらのイベントを処理する際に過剰な負荷が発生する可能性があります。これを避けるには、バッチモードで次のコマンドを実行できます。

salt --batch-size 50 '*' state.sls util.mgr_mine_config_clean_up

このコマンドが終了するまで待つ必要があります。Ctrl+Cを使用して処理を終了しないでください。

5. 不要なTaskomaticジョブの無効化

To minimize wasted resources, you can disable non-essential or unused Taskomatic jobs.

You can see the list of Taskomatic jobs in the SUSE Manager Web UI, at Admin  Task Schedules.

To disable a job, click the name of the job you want to disable, select Disable Schedule, and click Update Schedule.

To delete a job, click the name of the job you want to delete, and click Delete Schedule.

We recommend disabling these jobs:

  • Daily comparison of configuration files: compare-configs-default

  • Hourly synchronization of Cobbler files: cobbler-sync-default

  • Daily gatherer and subscription matcher: gatherer-matcher-default

Do not attempt to disable any other jobs, as it could prevent SUSE Manager from functioning correctly.

6. Swap and Monitoring

It is especially important in large scale deployments that you keep your SUSE Manager Server constantly monitored and backed up.

Swap space use can have significant impacts on performance. If significant non-transient swap usage is detected, you can increase the available hardware RAM.

You can also consider tuning the Server to consume less memory. For more information on tuning, see Scaling Minions (Large Scale Deployments).

7. AES Key Rotation

Communications from the Salt Master to clients is encrypted with a single AES key. The key is rotated when:

  • The salt-master process is restarted, or

  • Any minion key is deleted (for example, when a client is deleted from SUSE Manager)

After the AES key has been rotated, all clients must re-authenticate to the master. By default, this happens next time a client receives a message. If you have a large number of clients (several thousands), this can cause a high CPU load on the SUSE Manager Server. If the CPU load is excessive, we recommend that you delete keys in batches, and in off-peak hours if possible, to avoid overloading the server.

For more information, see: