Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1367826 - [scale] - Python SDK: Enable HTTP compression by default
[scale] - Python SDK: Enable HTTP compression by default
Status: CLOSED CURRENTRELEASE
Product: ovirt-engine-sdk-python
Classification: oVirt
Component: Core (Show other bugs)
4.0.0a
x86_64 Linux
unspecified Severity high (vote)
: ovirt-4.1.0-alpha
: 4.1.0
Assigned To: Ondra Machacek
Eldad Marciano
: Improvement, Performance
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2016-08-17 10:51 EDT by Eldad Marciano
Modified: 2017-02-01 09:57 EST (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Enhancement
Doc Text:
Previously, Python SDK was configured to communicate with the server using uncompressed responses. This caused long response times. In this release, the default configuration is to send compressed responses.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2017-02-01 09:57:15 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: Infra
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
rule-engine: ovirt‑4.1+
gklein: testing_plan_complete-
rule-engine: planning_ack+
mperina: devel_ack+
eberman: testing_ack+


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
oVirt gerrit 62569 master MERGED Enable HTTP compression by default 2016-10-04 09:57 EDT

  None (edit)
Description Eldad Marciano 2016-08-17 10:51:30 EDT
Description of problem:
when scanning a large scale list without compress can be found long response time.

when compress=True we got much faster response time 

see the comparison:
compress False
list size cap 100 response time 4.50143885612
list size cap 300 response time 11.0167760849
list size cap 500 response time 27.9535710812

compress True
list size cap 100 response time 2.03919100761
list size cap 300 response time 1.44519710541
list size cap 500 response time 2.07873082161



Version-Release number of selected component (if applicable):


How reproducible:
100%

Steps to Reproduce:
1. api.system_service().hosts_service().list(max=x amount of objects)
2.
3.

Actual results:
compress not enabled by default

Expected results:
compress should be enabled by default

Additional info:
Comment 1 Yaniv Kaul 2016-08-17 10:57:42 EDT
juan - what is the status of compression in the new Ruby gem, which the new provider in CFME uses? Can this speed up initial inventory fetch?

Any downside to this being the default? (higher CPU usage on the client? not sure  it's an issue).
Comment 2 Juan Hernández 2016-08-17 11:19:34 EDT
Compression is also supported in the Ruby SDK, but it isn't enabled by default. Enabling it is a matter of adding the "compress=True" parameter (in Python) or ":compress => true" parameter (in Ruby).

In the CFME provider compression isn't enabled:

  https://github.com/ManageIQ/manageiq/blob/master/app/models/manageiq/providers/redhat/infra_manager.rb#L65

Enabling it could speed up initial inventory fetch, but I guess that not a lot, as most of the time is due to the multiple network round-trips between ManageIQ and oVirt. I don't have numbers to back this statement.

CPU usage is a downside, but probably not the most important. I believe that the most important downside is debugging. If compression is enabled then the debug messages (if debug is enabled) contain the compressed output (this is how libcurl works) which makes them almost useless.

As debugging isn't enabled by default in ManageIQ I think we can enable compression. We should probably also add configuration parameters so that the ManageIQ user/developer can enable/disable both debugging and compression.
Comment 3 Martin Perina 2016-08-24 00:55:22 EDT
Targeting to 4.1 for now, if needed we can backport to 4.0.z (in that we case we would need separate bugs for each SDK).
Comment 4 Sandro Bonazzola 2016-12-12 09:01:23 EST
The fix for this issue should be included in oVirt 4.1.0 beta 1 released on December 1st. If not included please move back to modified.
Comment 5 Eldad Marciano 2017-01-09 09:35:11 EST
verified on top of sdk 4.1: 
-=>>python /usr/lib64/python2.7/site-packages/ovirtsdk4/version.py
4.1.0a0

when ignore the compress flag when creating the api object:

list size cap 10 response time 1.23655796051
list size cap 300 response time 1.87913990021
list size cap 500 response time 2.52585601807

Note You need to log in before you can comment on or make changes to this bug.