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

Measure latency utility #28

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jabolina
Copy link
Member

We just run:

ansible-playbook -i inventory_file.yaml measure_latency.yml

And we get the latency between the servers and between the agents to the servers. The output is written to the Ansible stdout, such as:

TASK [latency_summary : Check server latency from server] ****************************************************************************************************************************************************************************************************************************************************
changed: [ec2-18-231-23-180.sa-east-1.compute.amazonaws.com]
changed: [ec2-18-230-56-175.sa-east-1.compute.amazonaws.com]
changed: [ec2-18-228-235-147.sa-east-1.compute.amazonaws.com]

TASK [latency_summary : Latency summary] *********************************************************************************************************************************************************************************************************************************************************************
ok: [ec2-18-231-23-180.sa-east-1.compute.amazonaws.com] => {
    "msg": [
        "ec2-18-231-23-180.sa-east-1.compute.amazonaws.com -> min/avg/max/mdev=0.019/0.039/0.051/0.005 ms",
        "ec2-18-228-235-147.sa-east-1.compute.amazonaws.com -> min/avg/max/mdev=0.157/0.180/0.226/0.014 ms",
        "ec2-18-230-56-175.sa-east-1.compute.amazonaws.com -> min/avg/max/mdev=0.168/0.316/3.692/0.627 ms"
    ]
}
ok: [ec2-18-228-235-147.sa-east-1.compute.amazonaws.com] => {
    "msg": [
        "ec2-18-231-23-180.sa-east-1.compute.amazonaws.com -> min/avg/max/mdev=0.136/0.171/0.202/0.014 ms",
        "ec2-18-228-235-147.sa-east-1.compute.amazonaws.com -> min/avg/max/mdev=0.015/0.030/0.056/0.007 ms",
        "ec2-18-230-56-175.sa-east-1.compute.amazonaws.com -> min/avg/max/mdev=0.139/0.161/0.185/0.010 ms"
    ]
}
ok: [ec2-18-230-56-175.sa-east-1.compute.amazonaws.com] => {
    "msg": [
        "ec2-18-231-23-180.sa-east-1.compute.amazonaws.com -> min/avg/max/mdev=0.139/0.185/0.226/0.017 ms",
        "ec2-18-228-235-147.sa-east-1.compute.amazonaws.com -> min/avg/max/mdev=0.127/0.149/0.187/0.013 ms",
        "ec2-18-230-56-175.sa-east-1.compute.amazonaws.com -> min/avg/max/mdev=0.022/0.036/0.055/0.005 ms"
    ]
}

...

TASK [latency_summary : Check server latency from hyperfoil_agent] *******************************************************************************************************************************************************************************************************************************************
changed: [ec2-18-228-235-120.sa-east-1.compute.amazonaws.com]
changed: [ec2-18-228-117-249.sa-east-1.compute.amazonaws.com]

TASK [latency_summary : Latency summary] *********************************************************************************************************************************************************************************************************************************************************************
ok: [ec2-18-228-235-120.sa-east-1.compute.amazonaws.com] => {
    "msg": [
        "ec2-18-231-23-180.sa-east-1.compute.amazonaws.com -> min/avg/max/mdev=0.200/0.376/4.697/0.802 ms",
        "ec2-18-228-235-147.sa-east-1.compute.amazonaws.com -> min/avg/max/mdev=0.206/0.227/0.279/0.017 ms",
        "ec2-18-230-56-175.sa-east-1.compute.amazonaws.com -> min/avg/max/mdev=0.208/0.232/0.317/0.023 ms"
    ]
}
ok: [ec2-18-228-117-249.sa-east-1.compute.amazonaws.com] => {
    "msg": [
        "ec2-18-231-23-180.sa-east-1.compute.amazonaws.com -> min/avg/max/mdev=0.195/0.221/0.264/0.015 ms",
        "ec2-18-228-235-147.sa-east-1.compute.amazonaws.com -> min/avg/max/mdev=0.192/0.207/0.259/0.012 ms",
        "ec2-18-230-56-175.sa-east-1.compute.amazonaws.com -> min/avg/max/mdev=0.150/0.241/0.880/0.120 ms"
    ]
}

A little utility for quality-of-life to analyze the hypothetical optimum for operations.

Copy link
Member

Choose a reason for hiding this comment

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

This file should be in the files directory and not tasks as per https://docs.ansible.com/ansible/2.8/user_guide/playbooks_best_practices.html#directory-layout

Copy link
Member

Choose a reason for hiding this comment

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

I wonder if we should always just run this for each benchmark? This would prevent adding a new root playbook. WDYT?

Copy link
Member Author

Choose a reason for hiding this comment

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

Makes sense to me

* Added a role to measure the latency between the nodes in
  the hot-path of the benchmark.
* Measures the latency internally between the servers and the latency
  from agents to servers.
* Output the summary to the Ansible stdout.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants