Steps to reproduce:
- Create multi-gb file gs://your_bucket/obj
- Test gsutil speed with "gsutil cp gs://your_bucket/obj /local/copy"
- download via gcloud.storage.Blob.download_to_filename (see sample script below)
Expected result: similar timing
Actual result on my machine: gsutil downloads 4.6GB in 1min14sec, gcloud.storage takes 20min.
If I add blob.chunk_size=1<<30 prior to download_to_filename, gcloud.storage takes the same time as gsutil to the second.
Sample script:
#!/usr/bin/env python
import httplib2
httplib2.debuglevel=4
import gcloud.storage
bucket_id = 'BUCKET'
blob_id = 'OBJECT'
url = 'gs://%s/%s' % (bucket_id, blob_id)
project = 'dnewgas-test-1'
client = gcloud.storage.client.Client(project)
bucket = client.get_bucket(bucket_id)
blob = bucket.get_blob(blob_id)
//blob.chunk_size=1<<30
blob.download_to_filename('/tmp/down')
Steps to reproduce:
Expected result: similar timing
Actual result on my machine: gsutil downloads 4.6GB in 1min14sec, gcloud.storage takes 20min.
If I add
blob.chunk_size=1<<30prior to download_to_filename, gcloud.storage takes the same time as gsutil to the second.Sample script: