How to test disk speed in an environment running a Bamboo process

お困りですか?

アトラシアン コミュニティをご利用ください。

コミュニティに質問


プラットフォームについて: Server および Data Center のみ。この記事は、Server および Data Center プラットフォームのアトラシアン製品にのみ適用されます。

Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Fisheye および Crucible は除く

要約

Poor disk I/O can result in performance issues on your system, manifested through many different symptoms.

When it comes to connectivity, a symptom could be long wait times persisting messages to disk. This impacts remote agent connectivity as ActiveMQ tries to persist messages to disk before responding to agents, causing them to time out. It can also cause issues with artifact transfers from remote agents.

ActiveMQ's message persistence layer is KahaDB, and KahaDB actually comes packaged with disk benchmarking tools that mimic the disk I/O of normal message persistence.

The goal of this article is not to solve a problem, but to identify if there is a problem with a disk.

環境

Any environment running either Bamboo or a Bamboo agent. 

診断

We can identify potential disk I/O issues on a disk by running the following benchmark test:

Linux:

# For Bamboo server:
cd <bamboo-install-dir>/atlassian-bamboo/WEB-INF/lib
# For Bamboo agent:
cd <agent-home>/classpath

java -classpath "activemq-kahadb-store*.jar:*" org.apache.activemq.store.kahadb.disk.util.DiskBenchmark /path/to/folder/disk-benchmark.dat --bs=4194304

Windows の場合:

# For Bamboo server:
cd <bamboo-install-dir>\atlassian-bamboo\WEB-INF\lib
# For Bamboo agent:
cd <agent-home>\classpath

java -classpath * org.apache.activemq.store.kahadb.disk.util.DiskBenchmark <path\to\folder>\disk-benchmark.dat --bs=4194304

This benchmark runs three 10-second tests to determine how many Writes, Sync Writes, and Reads can be performed within each 10 second window. Each test uses the ActiveMQ default message block size of 4MB (4,194,304 bytes). It can also be run without the --bs flag to use the test default block size of 4KB (4,096 bytes)

It's important to note that "/path/to/folder/disk-benchmark.dat" should address a folder relevant to the tests. For example, if Bamboo is suffering from ActiveMQ performance issues, then the problematic folder could be "<BAMBOO_HOME>/jms-store", therefore the full path should be "<BAMBOO_HOME>/jms-store/disk-benchmark.dat"

This is an example of healthy output:

Benchmarking: /path/to/folder/disk-benchmark.dat
Writes:
1613 writes of size 4194304 written in 10.116 seconds.
159.45038 writes/second.
637.8015 megs/second.

Sync Writes:
1189 writes of size 4194304 written in 10.005 seconds.
118.840576 writes/second.
475.3623 megs/second.

Reads:
8444 reads of size 4194304 read in 10.001 seconds.
844.31555 writes/second.
3377.2622 megs/second.

The Sync Writes number represents the max transaction/second possible on your hardware. It is possible to experiment with the block size --bs to get an optimum value and configure KahaDB accordingly through the journalMaxWriteBatchSize and indexWriteBatchSize.





最終更新日 2021 年 4 月 19 日

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.