Bug 1010006
Summary: | PERF: Fetch of districts is very slow | ||
---|---|---|---|
Product: | OpenShift Online | Reporter: | Dan McPherson <dmcphers> |
Component: | Pod | Assignee: | Dan McPherson <dmcphers> |
Status: | CLOSED CURRENTRELEASE | QA Contact: | libra bugs <libra-bugs> |
Severity: | urgent | Docs Contact: | |
Priority: | unspecified | ||
Version: | 2.x | CC: | jhou |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2013-10-17 13:29:44 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Dan McPherson
2013-09-19 16:53:41 UTC
Correction: It looks like new isn't being called by mongoid on subsequent fetches. Looks like it might just be the amount of data being returned that's the issue. The fix here is not to include available_uids when finding a node during app create. Verified on devenv_3810 1. Create 51 disctricst with oo-admin-ctl-district libra_rs:PRIMARY> db.districts.count() 51 2. Connect to datastore, verify the unique indexes have been enabled on the district collection libra_rs:PRIMARY> db.districts.getIndexes() [ { "v" : 1, "key" : { "_id" : 1 }, "ns" : "openshift_broker_dev.districts", "name" : "_id_" }, { "v" : 1, "key" : { "name" : 1 }, "unique" : true, "ns" : "openshift_broker_dev.districts", "name" : "name_1" }, { "v" : 1, "key" : { "uuid" : 1 }, "unique" : true, "ns" : "openshift_broker_dev.districts", "name" : "uuid_1" }, { "v" : 1, "key" : { "gear_size" : 1 }, "ns" : "openshift_broker_dev.districts", "name" : "gear_size_1" } ] 3. Query districts irb(main):007:0> require '/var/www/openshift/broker/config/environment' irb(main):007:0> require '/opt/rh/ruby193/root/usr/share/gems/gems/openshift-origin-controller-1.15.0/app/models/district.rb' irb(main):052:0> a = Time.now;District.find_all();b = Time.now - a => 0.671984381 irb(main):053:0> a = Time.now;District.find_all(nil,false);b = Time.now - a => 0.005056106 Takes 5ms when uuids are not included in the query criterion。 |