This detailed workload setup provides a comprehensive overview of the Kafka consumer environment on Linux, detailing how cloud events are handled, system resource configurations, and message publishing mechanisms.
...
Configuring a performance test scenario with a load-testing tool, possibly using something like k6 for generating load.
Code Block language py title K6 Scenarios collapse true produce_cm_avc_event: { executor: 'shared-iterations', exec: 'produce_cm_avc_event', vus: 1000, // You can adjust VUs to meet performance requirements iterations: $TOTAL_MESSAGES, // Total messages to publish (for example: 100 K , 200 K) maxDuration: '15m', // Adjust depending on the expected completion time }
Explanation:
- executor: 'shared-iterations': The
shared-iterations
executor divides the total number of iterations among the virtual users (VUs). This is ideal if you know the total amount of work (in this case, messages) that you want to execute but not how long it will take. - exec: Refers to the function or scenario name that handles the actual work (in this case, generating CM AVC events).
- vus: The number of virtual users that will be running concurrently. You can adjust this based on how much load you want to simulate.
- iterations: The total number of iterations (or messages in your case) that the virtual users will complete. You can set this based on your performance test needs, e.g.,
100000
or200000
. - maxDuration: The maximum time the test is allowed to run. If the iterations are not completed within this time, the test will stop.
Suggested Adjustments:
- Make sure to replace
$TOTAL_MESSAGES
with a specific value, such as100000
or200000
, depending on your test requirements. - You may want to tune the
vus
andmaxDuration
depending on your system's capacity and how fast you expect the messages to be processed. If you're testing scalability, start with a smaller number and increase.
- executor: 'shared-iterations': The
Test Environment
# | Environment/Workload | Description | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
1 | Tested on Linux | Laptop : Dell Inc. XPS 15 9530 | |||||||||
2 | Tested on Windows | Laptop : Lenovo ThinkPad | |||||||||
2 | Number of CPS Instance | 1 | |||||||||
NCMP resource config | YAML Configuration: Defines deployment resources for the NCMP service: Replicas: 1 CPU Reservations: 2 CPUs Memory Reservations: 2 GB CPU Limits: 3 CPUs Memory Limits: 3 GB | ||||||||||
Kafka Topic configuration | CM Notification Topic Configuration: Enabled: false Group ID: cm_events Topic Name: dmi-cm-events | ||||||||||
Publishing topic name | dmi-cm-events | ||||||||||
Forwarded topic name | cm-events | ||||||||||
4 | Total number of Cm Avc cloud events | 100,000/200,000 Kafka messages sent through the Kafka topic. | |||||||||
5 | Cloud event headers | The headers for each Kafka message contain the following fields: ce_type: "org.onap.cps.ncmp.events.avc1_0_0.AvcEvent" ce_source: "DMI" ce_destination: "dmi-cm-events" ce_specversion: "1.0" ce_time: ISO-formatted timestamp ce_id: A unique ID generated using crypto.randomUUID() ce_dataschema: "urn:cps.onap.cps.ncmp.events.avc1_0_0.AvcEvent:1.0.0" ce_correlationid: Correlation ID generated using crypto.randomUUID() | |||||||||
6 | Kafka payload |
| |||||||||
8 | Number of DMI Plugin stub | 1 DMI Plugin Stub is used for testing purposes. | |||||||||
9 | Commit ID | 81eb7dfc2f100a72692d2cbd7ce16540ee0a0fd4 | |||||||||
10 | Commit ID link | Commit Link | |||||||||
11 | K6 script (to publish cloud events) | The test script used to publish cloud events is located at: ..\cps\k6-tests\once-off-test\kafka\produce-avc-event.js |
...
Metric | Linux (i9) | Windows (i5) | Linux (i9) | Windows (i5) |
Total number of kafka messages | 100,000 | 200,000 | ||
CPU Usage (%) | 44.2 | 82.1 | 78.3 | 72.6 |
Memory Usage (MB) | 244 | 195 | 212 | 222 |
Total Threads | 321 | 320 | 320 | 319 |
First Message Processed (HH:MM:SS) | 16:37:11 | 17:30:51 | 16.52.54 | 17.42.56 |
Last Message Processed (HH:MM:SS) | 16:37:14 | 17:31:03 | 16.52.59 | 17.43.10 |
Total Time to Process Messages (Seconds) | 3 | 12 | 5 | 14 |
Message Throughput (Messages/Second) | 33,333 | 8,333 | 40,000 | 14,286 |
Estimated Bandwith (1.5Kb/message) Mbps | 391 | 98 | 469 | 167 |
Linux (i9), 100,000 |
Linux (i9), 200,000 |
Windows (i5), 100,000 |
Windows (i5), 200,000 |
...