GoogleCloudPlatform / GoogleCloudPlatform/PerfKitBenchmarker

Cloudsuite web serving benchmark not working

Open
#3,891 0 comments 0 reactions 1 assignee Claimed by @asaksena View on GitHub
Dominant language
Python
Stars
2k
Forks
562
Avg merge
4h 55m
Merged PRs (30d)
69

Description

When I try to run the Cloudsuite web serving benchmark with the command:

/pkb.py --cloud=AWS --benchmarks=cloudsuite_web_serving --machine_type=c5.4xlarge --zone=eu-central-1

it gets stuck in this phase:

2022-11-16 09:13:27,610 25ba0586 MainThread cloudsuite_web_serving(1/1) INFO Running: ssh -A -p 22 ubuntu@3.67.67.244 -2 -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -o IdentitiesOnly=yes -o PreferredAuthentications=publickey -o PasswordAuthentication=no -o ConnectTimeout=5 -o GSSAPIAuthentication=no -o ServerAliveInterval=30 -o ServerAliveCountMax=10 -i /tmp/perfkitbenchmarker/runs/25ba0586/perfkitbenchmarker_keyfile -o ControlPath="/tmp/perfkitbenchmarker/runs/25ba0586/ssh/%h" -o ControlMaster=auto -o ControlPersist=30m sudo docker run --net host --name faban_client cloudsuite3/web-serving:faban_client 10.0.0.131 100

If I check the logs for the faban_client container, I can see many messages about `Connection refused` to port 8080 of the web server. I check in the web server and I see that there is no process listening on that port.

I've found that the problem is because in the `/etc/bootstrap.sh` script of the web server there are problems with the parameters. The script expects 5 parameters, as can be see in these lines:

PROTOCOL=${1:-"http"} # the protocol to access the server, valid values are 'http' and 'https'
ROOT_SERVER=${2:-"root_server"}
DB_SERVER_IP=${3:-"mysql_server"}
MEMCACHE_SERVER_IP=${4:-"memcache_server"}
FPM_CHILDREN=${5:-80}

Therefore, the first parameter should be the protocol and the second the root server. However, in `perfkitbenchmarker/linux_benchmarks/cloudsuite_web_serving_benchmark.py`, the script is invoked with only three parameters: the DB server, the memcache server and the number of children, as can be see in [these lines](https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/67b3cca6408f3c6ebc18d14589a5434fef4dc9a7/perfkitbenchmarker/linux_benchmarks/cloudsuite_web_serving_benchmark.py#L130):

vm.RemoteCommand('sudo docker run -dt --net host --name web_server '
'cloudsuite/web-serving:web_server '
'/etc/bootstrap.sh mysql_server memcache_server %s' %
(FLAGS.cloudsuite_web_serving_pm_max_children))

I changed the last two lines to what I think is correct:

'/etc/bootstrap.sh http web_server mysql_server memcache_server %s' %
(FLAGS.cloudsuite_web_serving_pm_max_children))

After that, ELGG begins to listen on port 8080. However, new errors appear: it tries to use tables (`ELGG_DB.elgg_private_settings` and `ELGG_DB.elgg_users_sessions`) that don't appear in the database. I could check that by connecting to the database container and inspecting with `mysql` the database directly. It looks like there is a mismatch between the version of ELGG used in the web server and the one used in the database.

I could fix all the errors by using the current version of the Cloudsuite benchmark, v3. For that, I had to change the images used in the docker deployment. I can submit a pull request with this change if you think it is a good idea.

What do you think?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.