Bad math interpreting rbd_store_chunk_size leads to wrong chunk size and slow upload of images

Bug #1390386 reported by Erik McCormick
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Glance
Invalid
Undecided
David Wilde

Bug Description

Setting rbd_store_chunk_size -= 8 leads to an actual chunk size of 8 KB not 8 MB. The result is incredibly slow uploads to the RBD backend.

2014-11-06 11:42:30.619 6986 DEBUG glance_store._drivers.rbd [-] writing chunk at offset 8208 add /usr/lib/python2.7/site-packages/glance_store/_drivers/rbd.py:365
2014-11-06 11:42:30.626 6986 DEBUG glance_store._drivers.rbd [-] writing chunk at offset 16416 add /usr/lib/python2.7/site-packages/glance_store/_drivers/rbd.py:365
2014-11-06 11:42:30.633 6986 DEBUG glance_store._drivers.rbd [-] writing chunk at offset 24624 add /usr/lib/python2.7/site-packages/glance_store/_drivers/rbd.py:365
2014-11-06 11:42:30.638 6986 DEBUG glance_store._drivers.rbd [-] writing chunk at offset 32832 add /usr/lib/python2.7/site-packages/glance_store/_drivers/rbd.py:365

/usr/lib/python2.7/site-packages/glance_store/_drivers/rbd.py: Line 192

self.chunk_size = chunk * (1024 ^ 2)

should be either

self.chunk_size = chunk * (1024 ** 2)

or

self.chunk_size = chunk * units.Mi

tags: added: low-hanging-fruit
David Wilde (dave-wilde)
Changed in glance:
assignee: nobody → David Wilde (david-wilde-rackspace)
Revision history for this message
David Wilde (dave-wilde) wrote :

Duplicate of #1370247

Changed in glance:
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.