gcloud very slow

3,471 views
Skip to first unread message

Theron Luhn

unread,
Jul 21, 2015, 2:27:59 PM7/21/15
to google-c...@googlegroups.com
gcloud on my Mac (OS X 10.10.4) is acting very slowly.  For example, `gcloud compute zones list` takes over a minute to complete.  I suspect it has something to do with my office network, since it seems to work fine from home.  I can't think what the network problem would be, though, gcloud just uses HTTP, which I know works fine, and similar CLIs such as the AWS CLI are blazing fast.

Here's the output from the zone list:

google-cloud-sdk  bin/gcloud compute zones list --log-http --verbosity debug
DEBUG: Running gcloud.compute.zones.list with Namespace(__calliope_internal_deepest_parser=ArgumentParser(prog='gcloud.compute.zones.list', usage=None, description='List Google Compute Engine zones.', version=None, formatter_class=<class 'argparse.HelpFormatter'>, conflict_handler='error', add_help=False), cmd_func=<bound method Command.Run of <googlecloudsdk.calliope.backend.Command object at 0x1112c2e10>>, command_path=['gcloud', 'compute', 'zones', 'list'], document=None, endpoint=None, format=None, h=None, help=None, http_timeout=None, limit=None, log_http=True, markdown=None, names=[], project=None, quiet=None, regexp=None, sort_by=None, trace_token=None, uri=False, user_output_enabled=None, verbosity='debug', version=None).
DEBUG: Starting batch request...
DEBUG: Adding request: (<googlecloudapis.compute.v1.compute_v1_client.ZonesService object at 0x110fac490>, 'List', <ComputeZonesListRequest
 maxResults: 500
 project: [redacted]'>)
DEBUG: Making batch request...
--request-start--
uri: https://www.googleapis.com/batch
-headers-start-
Authorization: Bearer [redacted]
content-length: 475
content-type: multipart/mixed; boundary="===============1365626220100345520=="
user-agent: Cloud SDK Command Line Tool gcloud/0.9.69 command/gcloud.compute.zones.list invocation-id/9b07f798ad8e4bc090b20d132a2049f3 environment/None interactive/True (Macintosh; Intel Mac OS X 14.4.0)
-headers-end-
-body-start-
--===============1365626220100345520==
Content-Type: application/http
MIME-Version: 1.0
Content-Transfer-Encoding: binary
Content-ID: <481ad0bb-4046-4838-bb6f-f1eefff4a30f+0>
GET /compute/v1/projects/[redacted]/zones?alt=json&maxResults=500 HTTP/1.1
Content-Type: application/json
MIME-Version: 1.0
content-length: 0
accept-encoding: gzip, deflate
accept: application/json
user-agent: apitools-client/1.0
Host: www.googleapis.com

--===============1365626220100345520==--
-body-end-
--request-end--

At this point, it hangs for a long time, before the response is received and the zones outputted.

Valentin Stanciu

unread,
Jul 22, 2015, 1:17:52 PM7/22/15
to Theron Luhn, google-c...@googlegroups.com
Hi Theron,

It probably would be helpful to run a traceroute as well:
traceroute www.googleapis.com

Valentin

--
You received this message because you are subscribed to the Google Groups "google-cloud-sdk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-s...@googlegroups.com.
Visit this group at http://groups.google.com/group/google-cloud-sdk.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-sdk/7d4b5f88-e67c-4c33-a2ce-9129d542c103%40googlegroups.com.

Theron Luhn

unread,
Jul 22, 2015, 5:51:42 PM7/22/15
to google-cloud-sdk, sval...@google.com
traceroute www.googleapis.com
traceroute to googleapis.l.google.com (74.125.129.95), 64 hops max, 52 byte packets
 1  192.168.1.1 (192.168.1.1)  0.637 ms  0.324 ms  0.383 ms
 2  dsldevice.attlocal.net (192.168.7.254)  1.061 ms  0.871 ms  0.888 ms
 3  104-5-4-1.lightspeed.frokca.sbcglobal.net (104.5.4.1)  8.895 ms  4.882 ms  4.589 ms
 4  71.147.199.180 (71.147.199.180)  5.617 ms  6.309 ms  5.059 ms
 5  75.29.64.110 (75.29.64.110)  5.135 ms  4.833 ms  4.784 ms
 6  75.29.64.173 (75.29.64.173)  5.455 ms  5.380 ms  5.120 ms
 7  12.83.77.145 (12.83.77.145)  6.620 ms  7.570 ms
    12.83.77.137 (12.83.77.137)  7.258 ms
 8  12.122.137.181 (12.122.137.181)  78.481 ms  32.430 ms  30.218 ms
 9  12.250.31.10 (12.250.31.10)  29.307 ms  29.439 ms  31.494 ms
10  216.239.49.170 (216.239.49.170)  9.688 ms
    216.239.49.168 (216.239.49.168)  9.748 ms  13.991 ms
11  209.85.246.253 (209.85.246.253)  28.593 ms
    209.85.246.20 (209.85.246.20)  9.523 ms
    209.85.246.253 (209.85.246.253)  28.566 ms
12  216.239.49.198 (216.239.49.198)  25.244 ms  37.739 ms  27.831 ms
13  216.239.40.148 (216.239.40.148)  28.476 ms
    64.233.175.36 (64.233.175.36)  28.786 ms
    216.239.40.146 (216.239.40.146)  28.557 ms
14  216.239.46.175 (216.239.46.175)  27.871 ms
    216.239.46.171 (216.239.46.171)  28.072 ms
    74.125.37.213 (74.125.37.213)  28.242 ms
15  * * *
16  pd-in-f95.1e100.net (74.125.129.95)  27.908 ms  28.224 ms  27.855 ms

Glenn Fowler

unread,
Jul 23, 2015, 3:37:42 PM7/23/15
to google-cloud-sdk, tjl...@gmail.com, tjl...@gmail.com
I created an internal issue to address this. Thanks for the report.

Theron Luhn

unread,
Jul 24, 2015, 4:22:54 PM7/24/15
to Glenn Fowler, google-cloud-sdk
Alright, I figured it out:  My office network is misconfigured for IPv6, so any IPv6 connections hang.  By disabling IPv6 on my computer all my performance problems with gcloud were resolved.  Strange that gcloud was the only thing affected.


— Theron

Glenn Fowler

unread,
Jul 24, 2015, 4:25:18 PM7/24/15
to Theron Luhn, google-cloud-sdk
Thanks for that valuable info. Glad the workaround got you going again.

Valentin Stanciu

unread,
Jul 24, 2015, 4:56:44 PM7/24/15
to Glenn Fowler, Theron Luhn, google-cloud-sdk
Ah, yes that would explain it.
In case you are still curious about which part takes a long time, maybe "traceroute6 www.googleapis.com" will help. In my original reply, I wrongly assumed IPv4 connectivity.

Valentin

--
You received this message because you are subscribed to the Google Groups "google-cloud-sdk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-s...@googlegroups.com.
Visit this group at http://groups.google.com/group/google-cloud-sdk.
Reply all
Reply to author
Forward
0 new messages