mex-docs

Geekbench

Geekbench is a benchmarking tool measures system performance by executing a number of CPU and GPU related benchmarking tests. This tool can be used to measure performance not only of bare metal systems, but also of virtualized systems as well. The easiest way to do this is to use a docker image with pre-installed and set as the entry point. This image can be used either as a docker image or as part of a docker-compose file.

Running as a Docker Image

Geekbench can be run directly from the docker command line. This example pulls the image from docker hub, runs it with a controlling terminal attached for output, and then removes it when it completes. The program will provide a running log of it’s findings and the tests it is running to stdout, but the full output will be available online via a link that will be provided in the output.

$ docker run -it --rm davidsarkany/geekbench
Geekbench 5.3.1 Tryout : https://www.geekbench.com/

Geekbench 5 is in tryout mode.
<--------- SNIP --------->

Uploading results to the Geekbench Browser. This could take a minute or two
depending on the speed of your internet connection.

Upload succeeded. Visit the following link and view your results online:

  https://browser.geekbench.com/v5/cpu/4882648

Visit the following link and add this result to your profile:

  https://browser.geekbench.com/v5/cpu/4882648/claim?key=365602

Running via Docker Compose

You can also run this application via a compose-file; this is somewhat preferable to running directly via docker run, as it gives you a bit more control over the process. It is important to set the restart command to no in order to restrict the program from running once. Otherwise, it will run the benchmark over and over again until the container is stopped or deleted.

A sample compose file is provided here:

version: "2.3"
services:
  geekbench:
    image: "davidsarkany/geekbench"
    restart: "no"

Note that if you are testing GPU resources, the docker compose file needs to contain the correct commands/arguments to enable the container to access the GPU. The following compose file shows a sample for NVIDIA GPUs.

version: '2.3'
services:
  geekbench:
    image: "davidsarkany/geekbench"
    network_mode: "host"
    restart: no
    runtime: nvidia
    environment:
     - NVIDIA_VISIBLE_DEVICES=all

Deploying to MobiledgeX

The Geekbench container can be deployed to MobiledgeX as both a docker image and as a docker-compose file.

Notes:

  1. The nature of the benchmark is such that it consumes the entirety of the resources of the container, and by extension the VM host, as it runs. Because of this, you should only run this process to gather benchmarking information when required.
  2. The MobiledgeX platform is designed to restart failed containers by default; the way the Geekbench container works is to exit on completion of the benchmark, which will cause the MobiledgeX platform to attempt to restart the process. This will cause the benchmark to run again and again until the container is stopped or deleted via the console or the API.

Steps

Deploying the Geekbench container through the MobiledgeX console is no different from the process used for any other docker-compose deployment.

  1. Create the application definition.
    • The deployment type should be set as docker and the networking set to load balancer.
    • Any port can be selected, as the application will not expose a networking port. However a port must be selected in order to satisfy the platform requirement. However, be sure to disable the health check.
    • Use one of the two docker-compose files shown above, determining which to use based on the hardware you are testing.
  2. Create the cluster; set your flavor to that of the VM configuration you wish to test.
  3. Deploy your application instance using your application definition and the cluster you have created.
  4. Once the application instance is created, go to the “hamburger” menu on the far right of the line for your application instance in the web console and select Terminal.
  5. From the screen that appears, click the drop down to select Logs, then check the bimodal buttons to add timestamps and to follow the log.
  6. Observe the logs until the application instance finishes; the URL for the summary will be one of the last items in the log. Copy the URL and open it in your browser of choice.
  7. Close out of the Terminal page by using the Close button in the upper right.
  8. From the “hamburger” menu, select Delete to remove your application instance.
  9. Go to the cluster page and find the line for your cluster.
  10. Click on the “hamburger” menu and Delete the cluster.
  11. If you are done benchmarking, you can go to the application page and find the line for your application and, once again using the “hamburger” menu, choose Delete. If you will be doing further benchmarking you can leave the application active.