Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create Sysbench tool and testcases using it for CPU/Memory/FileIO performance #3075

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 55 additions & 1 deletion lisa/messages.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,32 @@ class PerfMessage(MessageBase):


@dataclass
class DiskPerformanceMessage(PerfMessage):
class SysbenchPerfMessage:
# Sysbench common params
min_latency_ms: float = 0.00
max_latency_ms: float = 0.00
avg_latency_ms: float = 0.00
percentile_95_latency_ms: float = 0.00
sum_latency_ms: float = 0.00
total_time: float = 0.00
events_avg: float = 0.00
events_stddev: float = 0.00
execution_time_avg: float = 0.00
execution_time_stddev: float = 0.00
total_events: Decimal = Decimal(0)
threads: int = 0
events: int = 0
time_limit_sec: int = 0


@dataclass
class CPUPerformanceMessage(PerfMessage, SysbenchPerfMessage):
benchmark: str = ""
cpu_speed: Decimal = Decimal(0)


@dataclass
class DiskPerformanceMessage(PerfMessage, SysbenchPerfMessage):
disk_setup_type: DiskSetupType = DiskSetupType.raw
block_size: int = 0
disk_type: DiskType = DiskType.nvme
Expand All @@ -168,6 +193,35 @@ class DiskPerformanceMessage(PerfMessage):
randwrite_iops: Decimal = Decimal(0)
randwrite_lat_usec: Decimal = Decimal(0)

# Sysbench FileIO params
read_mib_per_sec: Decimal = Decimal(0)
write_mib_per_sec: Decimal = Decimal(0)
fsyncs_per_sec: Decimal = Decimal(0)
file_fsync_all: str = ""
file_fsync_end: str = ""
total_file: int = 0
file_total_size_in_gb: int = 0
file_async_backlog: int = 0
file_fsync_freq: int = 0
file_merged_requests: int = 0
file_rw_ratio: float = 0
file_ops: str = ""
file_io_mode: str = ""
file_fsync_mode: str = ""


@dataclass
class MemoryPerformanceMessage(PerfMessage, SysbenchPerfMessage):
total_mib_transferred: int = 0
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should it be total_mib_transferred_per_sec? It's easy to cross check on different test settings.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have 2 fields for this. total_mib_transferred and mib_per_second

Here is the reference output. We are fetching both the figure under above metrics.

64190.27 MiB transferred (6417.03 MiB/sec)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks similar to total operations, it's not a metrics to measure perf. We don't need to collect all information. The comparable metrics is important. Other data can be found in log for troubleshooting.

block_size_in_kb: int = 0
memory_total_size_in_gb: int = 0
mib_per_second: float = 0.0
operations_per_second: float = 0
scope: str = ""
hugetlb_on: bool = False
access_mode: str = ""
operation: str = ""


@dataclass
class NetworkLatencyPerformanceMessage(PerfMessage):
Expand Down
2 changes: 2 additions & 0 deletions lisa/tools/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@
from .strace import Strace
from .stress_ng import StressNg
from .swap import Swap
from .sysbench import Sysbench
from .sysctl import Sysctl
from .systemd_analyze import SystemdAnalyze
from .tar import Tar
Expand Down Expand Up @@ -225,6 +226,7 @@
"Strace",
"StressNg",
"Swap",
"Sysbench",
"Sysctl",
"SystemdAnalyze",
"Tar",
Expand Down
Loading
Loading