Perform Blobstore Benchmark No Output
search cancel

Perform Blobstore Benchmark No Output

book

Article ID: 298129

calendar_today

Updated On:

Products

VMware Tanzu Application Service for VMs

Issue/Introduction

The Perform Blobstore Benchmark binary on the cloud controller is a useful utility to test several operations between the cloud controller and blobstore to identify potential performance bottlenecks such as delayed resource matching or slow droplet uploads. 

Recently there was an update that caused the utility to have no output:
cloud_controller/d322feb1-5d90-47b4-bdfb-1b21ee57645d:/var/vcap/jobs/cloud_controller_ng/bin# ./perform_blobstore_benchmarks
Performing blobstore benchmarks

cloud_controller/d322feb1-5d90-47b4-bdfb-1b21ee57645d:/var/vcap/jobs/cloud_controller_ng/bin#

This was found to be due to an update which changed where the utility's output was directed. This has since been patched.


Environment

Product Version: 3.0

Resolution

Until the patch can be consumed in Tanzu Application Service, here is the temporary workaround to get the utility to have output:
 
sudo vim /var/vcap/packages/cloud_controller_ng/cloud_controller_ng/lib/cloud_controller/benchmark/blobstore.rb
Add
Rails.logger = Logger.new(STDOUT) 

to the beginning of the perform method.

Below is an example of the change:

BEFORE
      1 require 'benchmark'
      2 require 'find'
      3 require 'zip'
      4
      5 module VCAP::CloudController
      6   module Benchmark
      7     class Blobstore
      8       def perform
      9         resource_dir = generate_resources
     10
     11         resource_timing = resource_match(resource_dir)
     12         Rails.logger.debug { "resource match timing: #{resource_timing * 1000}ms" }
<removed for brevity>

AFTER
      1 require 'benchmark'
      2 require 'find'
      3 require 'zip'
      4
      5 module VCAP::CloudController
      6   module Benchmark
      7     class Blobstore
      8       def perform
      9         Rails.logger = Logger.new(STDOUT)
     10         resource_dir = generate_resources
     11
     12         resource_timing = resource_match(resource_dir)
     13         Rails.logger.debug { "resource match timing: #{resource_timing * 1000}ms" }

Save the file, and exit. There is no need to restart the service. Rerun the utility:
 
cloud_controller/d322feb1-5d90-47b4-bdfb-1b21ee57645d:/var/vcap/jobs/cloud_controller_ng/bin# ./perform_blobstore_benchmarks
Performing blobstore benchmarks
D, [2024-04-05T19:15:49.242054 #2278649] DEBUG -- : resource match timing: 2.4650022387504578ms
D, [2024-04-05T19:15:49.499932 #2278649] DEBUG -- : package upload timing: 21.42101898789406ms
D, [2024-04-05T19:15:49.504800 #2278649] DEBUG -- : package download timing: 4.147255793213844ms
D, [2024-04-05T19:16:49.178802 #2278649] DEBUG -- : downloaded 25 buildpacks, total 8911841078 bytes read
D, [2024-04-05T19:16:49.178951 #2278649] DEBUG -- : buildpack download timing: 59668.699603527784ms
D, [2024-04-05T19:16:49.209030 #2278649] DEBUG -- : droplet upload timing: 26.470165699720383ms
D, [2024-04-05T19:16:49.212638 #2278649] DEBUG -- : droplet download timing: 3.025459125638008ms
D, [2024-04-05T19:16:52.317835 #2278649] DEBUG -- : big droplet upload timing: 2239.1636930406094ms
D, [2024-04-05T19:16:54.710822 #2278649] DEBUG -- : big droplet download timing: 2392.147995531559ms