)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"84f295f1a3a2b02bc03eb18a3f1220370c9c66ef","unresolved":false,"context_lines":[{"line_number":16,"context_line":"used). By shuffling the best hosts from weighed hosts list, we decrease"},{"line_number":17,"context_line":"rescheduling event chance in this case while not relying on maxing the"},{"line_number":18,"context_line":"host_subset_size config which makes scheduling logic for normal computes"},{"line_number":19,"context_line":"less optimal."},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"Change-Id: Icee137e15f264da59a1bdc1dc1ecfeaac82b98c6"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"9f436f4f_dc91f548","line":19,"updated":"2017-08-16 13:39:14.000000000","message":"Why does setting host_subset_size to a large value make scheduling for normal computes less optimal?","commit_id":"e01cb82021317b6dea67f1b4cea7498d3f69d8f3"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"1e0bab907542b963064c12cb283c36fe6ac2d156","unresolved":false,"context_lines":[{"line_number":16,"context_line":"used). By shuffling the best hosts from weighed hosts list, we decrease"},{"line_number":17,"context_line":"rescheduling event chance in this case while not relying on maxing the"},{"line_number":18,"context_line":"host_subset_size config which makes scheduling logic for normal computes"},{"line_number":19,"context_line":"less optimal."},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"Change-Id: Icee137e15f264da59a1bdc1dc1ecfeaac82b98c6"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"9f436f4f_27622ed9","line":19,"in_reply_to":"9f436f4f_c7048217","updated":"2017-08-16 13:59:30.000000000","message":"ah, yes, you are absolutely correct.","commit_id":"e01cb82021317b6dea67f1b4cea7498d3f69d8f3"},{"author":{"_account_id":9542,"name":"Pavlo Shchelokovskyy","email":"pshchelokovskyy@mirantis.com","username":"pshchelo"},"change_message_id":"1596cfd2bb477007b2e9f9819c2d8184380087f8","unresolved":false,"context_lines":[{"line_number":16,"context_line":"used). By shuffling the best hosts from weighed hosts list, we decrease"},{"line_number":17,"context_line":"rescheduling event chance in this case while not relying on maxing the"},{"line_number":18,"context_line":"host_subset_size config which makes scheduling logic for normal computes"},{"line_number":19,"context_line":"less optimal."},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"Change-Id: Icee137e15f264da59a1bdc1dc1ecfeaac82b98c6"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"9f436f4f_c7048217","line":19,"in_reply_to":"9f436f4f_dc91f548","updated":"2017-08-16 13:55:34.000000000","message":"say you have hosts being equal by everything but free CPU  which produces sorted weights as\n\n10, 5, 5, 5, ...\n\nsetting the host_subset_size\u003d3 gives you 66% chances that vm will be put on a host with weight 5, so the spread of the load is suboptimal IMO.\n\nMay be this is a contrived example, but such things can happen even in an initially distributed load (a user deletes a fat VM).","commit_id":"e01cb82021317b6dea67f1b4cea7498d3f69d8f3"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"b61c256c8cb51f236376e3df859a965cef6b9d6a","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Shuffle best hosts from weighed hosts"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"this should improve the scheduling logic for normal computes a bit by"},{"line_number":10,"context_line":"spreading the sheduling choice between multiple identical computes,"},{"line_number":11,"context_line":"but also will significantly improve scheduling logic for computes with"},{"line_number":12,"context_line":"ironic virt-driver."},{"line_number":13,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"9f436f4f_e62e5f8a","line":10,"range":{"start_line":10,"start_character":14,"end_line":10,"end_character":23},"updated":"2017-08-16 19:36:49.000000000","message":"scheduling","commit_id":"8d421f503e126575700739a6e0fb044d4a49b927"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"2a1db89c6df33fe22ad35b978454092254a1c64c","unresolved":false,"context_lines":[{"line_number":14,"context_line":"ironic API returns the nodes in a deterministic order, and usually they"},{"line_number":15,"context_line":"would have the same weight (especially so when resource classes are"},{"line_number":16,"context_line":"used). By shuffling the best hosts from weighed hosts list, we decrease"},{"line_number":17,"context_line":"rescheduling event chance in this case while not relying on maxing the"},{"line_number":18,"context_line":"host_subset_size config which makes scheduling logic for normal computes"},{"line_number":19,"context_line":"less optimal."},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"Change-Id: Icee137e15f264da59a1bdc1dc1ecfeaac82b98c6"},{"line_number":22,"context_line":"Closes-Bug: #1711184"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"9f436f4f_90e8e97b","line":19,"range":{"start_line":17,"start_character":49,"end_line":19,"end_character":13},"updated":"2017-08-16 18:47:22.000000000","message":"What do you mean by this? How does maxing host_subset_size make scheduling for \"normal computes\" less optimal?","commit_id":"8d421f503e126575700739a6e0fb044d4a49b927"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"9946ad101c13b785120cb7892fbefebba70aa4a2","unresolved":false,"context_lines":[{"line_number":14,"context_line":"ironic API returns the nodes in a deterministic order, and usually they"},{"line_number":15,"context_line":"would have the same weight (especially so when resource classes are"},{"line_number":16,"context_line":"used). By shuffling the best hosts from weighed hosts list, we decrease"},{"line_number":17,"context_line":"rescheduling event chance in this case while not relying on maxing the"},{"line_number":18,"context_line":"host_subset_size config which makes scheduling logic for normal computes"},{"line_number":19,"context_line":"less optimal."},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"Change-Id: Icee137e15f264da59a1bdc1dc1ecfeaac82b98c6"},{"line_number":22,"context_line":"Closes-Bug: #1711184"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"9f436f4f_2610e74d","line":19,"range":{"start_line":17,"start_character":49,"end_line":19,"end_character":13},"in_reply_to":"9f436f4f_90e8e97b","updated":"2017-08-16 19:27:05.000000000","message":"Heh, I asked precisely the same question on an earlier patchset :)\n\nhttps://review.openstack.org/#/c/494136/2//COMMIT_MSG\n\nGreat mind think alike, eh? ;)","commit_id":"8d421f503e126575700739a6e0fb044d4a49b927"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"0a611cdbecb2af167e4aea1debebf4d625cb1be3","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Pavlo Shchelokovskyy \u003cshchelokovskyy@gmail.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2017-08-17 09:15:42 +0000"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Allow shuffling best hosts from weighed hosts"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This patch adds a new boolean config option"},{"line_number":10,"context_line":"`[filter_scheduler]shuffle_top_weighed_hosts` (default False)."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"9f436f4f_a24dd53b","line":7,"range":{"start_line":7,"start_character":16,"end_line":7,"end_character":21},"updated":"2017-08-17 09:29:36.000000000","message":"s/best//","commit_id":"95bef1e25e273de1f5986e9b5561921d84e5a990"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"0a611cdbecb2af167e4aea1debebf4d625cb1be3","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Pavlo Shchelokovskyy \u003cshchelokovskyy@gmail.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2017-08-17 09:15:42 +0000"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Allow shuffling best hosts from weighed hosts"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This patch adds a new boolean config option"},{"line_number":10,"context_line":"`[filter_scheduler]shuffle_top_weighed_hosts` (default False)."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"9f436f4f_225b25f6","line":7,"range":{"start_line":7,"start_character":32,"end_line":7,"end_character":45},"updated":"2017-08-17 09:29:36.000000000","message":"s/weighed hosts/hosts with same weight/","commit_id":"95bef1e25e273de1f5986e9b5561921d84e5a990"},{"author":{"_account_id":9542,"name":"Pavlo Shchelokovskyy","email":"pshchelokovskyy@mirantis.com","username":"pshchelo"},"change_message_id":"591088db39d50b86f06c083419f08eeebe662e18","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Pavlo Shchelokovskyy \u003cshchelokovskyy@gmail.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2017-08-17 09:15:42 +0000"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Allow shuffling best hosts from weighed hosts"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This patch adds a new boolean config option"},{"line_number":10,"context_line":"`[filter_scheduler]shuffle_top_weighed_hosts` (default False)."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"9f436f4f_1df400f0","line":7,"range":{"start_line":7,"start_character":16,"end_line":7,"end_character":21},"in_reply_to":"9f436f4f_a24dd53b","updated":"2017-08-17 10:46:24.000000000","message":"that\u0027s the point, I am shuffling not any group with the same weight, but only the group which has the weight equal to the maximum between all (which is the weight of the first as the list is already descending-sorted on weight), so if you have\n\n[(h1,w5), (h2,w5), (h3,w4), (h4,w4)]\n\nit will only shuffle the first two, leaving the second two intact (see the unit test)\n\nthus i\u0027d like to keep mentioning \u0027top\u0027/\u0027best\u0027 etc as it correctly describes what is happening.","commit_id":"95bef1e25e273de1f5986e9b5561921d84e5a990"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"0a611cdbecb2af167e4aea1debebf4d625cb1be3","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Allow shuffling best hosts from weighed hosts"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This patch adds a new boolean config option"},{"line_number":10,"context_line":"`[filter_scheduler]shuffle_top_weighed_hosts` (default False)."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Enabling it will improve scheduling for the case when host_subset_size\u003d1"},{"line_number":13,"context_line":"but list of weighed hosts contains many hosts with the same best weight"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"9f436f4f_024dc13c","line":10,"updated":"2017-08-17 09:29:36.000000000","message":"how about shuffle_same_weighted_hosts to be explicit that this config option applies to when there are \u003e1 hosts with the exact same weight?","commit_id":"95bef1e25e273de1f5986e9b5561921d84e5a990"},{"author":{"_account_id":9542,"name":"Pavlo Shchelokovskyy","email":"pshchelokovskyy@mirantis.com","username":"pshchelo"},"change_message_id":"591088db39d50b86f06c083419f08eeebe662e18","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Allow shuffling best hosts from weighed hosts"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This patch adds a new boolean config option"},{"line_number":10,"context_line":"`[filter_scheduler]shuffle_top_weighed_hosts` (default False)."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Enabling it will improve scheduling for the case when host_subset_size\u003d1"},{"line_number":13,"context_line":"but list of weighed hosts contains many hosts with the same best weight"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"9f436f4f_fdc7fc94","line":10,"in_reply_to":"9f436f4f_024dc13c","updated":"2017-08-17 10:46:24.000000000","message":"yeah, \u0027shuffle_top_weighed_hosts\u0027 is not ideal, but again, i\u0027d like to keep mentioning \u0027top\u0027, so how about\n\n  shuffle_top_same_weighed_hosts\n\n?","commit_id":"95bef1e25e273de1f5986e9b5561921d84e5a990"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"0a611cdbecb2af167e4aea1debebf4d625cb1be3","unresolved":false,"context_lines":[{"line_number":12,"context_line":"Enabling it will improve scheduling for the case when host_subset_size\u003d1"},{"line_number":13,"context_line":"but list of weighed hosts contains many hosts with the same best weight"},{"line_number":14,"context_line":"(quite often the case for ironic nodes)."},{"line_number":15,"context_line":"On the other hand, enabling it will also make VM packing on hypervizors"},{"line_number":16,"context_line":"less dence even when host weighing is completely disabled."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"Change-Id: Icee137e15f264da59a1bdc1dc1ecfeaac82b98c6"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"9f436f4f_a266f5b9","line":15,"range":{"start_line":15,"start_character":67,"end_line":15,"end_character":69},"updated":"2017-08-17 09:29:36.000000000","message":"s/z/s/","commit_id":"95bef1e25e273de1f5986e9b5561921d84e5a990"},{"author":{"_account_id":9542,"name":"Pavlo Shchelokovskyy","email":"pshchelokovskyy@mirantis.com","username":"pshchelo"},"change_message_id":"591088db39d50b86f06c083419f08eeebe662e18","unresolved":false,"context_lines":[{"line_number":12,"context_line":"Enabling it will improve scheduling for the case when host_subset_size\u003d1"},{"line_number":13,"context_line":"but list of weighed hosts contains many hosts with the same best weight"},{"line_number":14,"context_line":"(quite often the case for ironic nodes)."},{"line_number":15,"context_line":"On the other hand, enabling it will also make VM packing on hypervizors"},{"line_number":16,"context_line":"less dence even when host weighing is completely disabled."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"Change-Id: Icee137e15f264da59a1bdc1dc1ecfeaac82b98c6"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"9f436f4f_9db8f010","line":15,"range":{"start_line":15,"start_character":67,"end_line":15,"end_character":69},"in_reply_to":"9f436f4f_a266f5b9","updated":"2017-08-17 10:46:24.000000000","message":"will do.","commit_id":"95bef1e25e273de1f5986e9b5561921d84e5a990"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"0a611cdbecb2af167e4aea1debebf4d625cb1be3","unresolved":false,"context_lines":[{"line_number":13,"context_line":"but list of weighed hosts contains many hosts with the same best weight"},{"line_number":14,"context_line":"(quite often the case for ironic nodes)."},{"line_number":15,"context_line":"On the other hand, enabling it will also make VM packing on hypervizors"},{"line_number":16,"context_line":"less dence even when host weighing is completely disabled."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"Change-Id: Icee137e15f264da59a1bdc1dc1ecfeaac82b98c6"},{"line_number":19,"context_line":"Closes-Bug: #1711184"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"9f436f4f_820771ca","line":16,"range":{"start_line":16,"start_character":8,"end_line":16,"end_character":9},"updated":"2017-08-17 09:29:36.000000000","message":"s/c/s/","commit_id":"95bef1e25e273de1f5986e9b5561921d84e5a990"},{"author":{"_account_id":9542,"name":"Pavlo Shchelokovskyy","email":"pshchelokovskyy@mirantis.com","username":"pshchelo"},"change_message_id":"591088db39d50b86f06c083419f08eeebe662e18","unresolved":false,"context_lines":[{"line_number":13,"context_line":"but list of weighed hosts contains many hosts with the same best weight"},{"line_number":14,"context_line":"(quite often the case for ironic nodes)."},{"line_number":15,"context_line":"On the other hand, enabling it will also make VM packing on hypervizors"},{"line_number":16,"context_line":"less dence even when host weighing is completely disabled."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"Change-Id: Icee137e15f264da59a1bdc1dc1ecfeaac82b98c6"},{"line_number":19,"context_line":"Closes-Bug: #1711184"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"9f436f4f_7d39cca1","line":16,"range":{"start_line":16,"start_character":8,"end_line":16,"end_character":9},"in_reply_to":"9f436f4f_820771ca","updated":"2017-08-17 10:46:24.000000000","message":"will do.","commit_id":"95bef1e25e273de1f5986e9b5561921d84e5a990"}],"nova/conf/scheduler.py":[{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"0a611cdbecb2af167e4aea1debebf4d625cb1be3","unresolved":false,"context_lines":[{"line_number":479,"context_line":"  weigher."},{"line_number":480,"context_line":"\"\"\"),"},{"line_number":481,"context_line":"    cfg.BoolOpt("},{"line_number":482,"context_line":"        \"shuffle_equal_top_weighed_hosts\","},{"line_number":483,"context_line":"        default\u003dFalse,"},{"line_number":484,"context_line":"        help\u003d\"\"\""},{"line_number":485,"context_line":"Enable spreading the instances between hosts with the same best weight."}],"source_content_type":"text/x-python","patch_set":5,"id":"9f436f4f_e2f51dcc","line":482,"range":{"start_line":482,"start_character":17,"end_line":482,"end_character":27},"updated":"2017-08-17 09:29:36.000000000","message":"s/equal_top/same/\n\ns/weighed/weight/\n\n(to match the commit message and comment)","commit_id":"95bef1e25e273de1f5986e9b5561921d84e5a990"},{"author":{"_account_id":9542,"name":"Pavlo Shchelokovskyy","email":"pshchelokovskyy@mirantis.com","username":"pshchelo"},"change_message_id":"591088db39d50b86f06c083419f08eeebe662e18","unresolved":false,"context_lines":[{"line_number":479,"context_line":"  weigher."},{"line_number":480,"context_line":"\"\"\"),"},{"line_number":481,"context_line":"    cfg.BoolOpt("},{"line_number":482,"context_line":"        \"shuffle_equal_top_weighed_hosts\","},{"line_number":483,"context_line":"        default\u003dFalse,"},{"line_number":484,"context_line":"        help\u003d\"\"\""},{"line_number":485,"context_line":"Enable spreading the instances between hosts with the same best weight."}],"source_content_type":"text/x-python","patch_set":5,"id":"9f436f4f_5804d614","line":482,"range":{"start_line":482,"start_character":17,"end_line":482,"end_character":27},"in_reply_to":"9f436f4f_e2f51dcc","updated":"2017-08-17 10:46:24.000000000","message":"see my reply in the commit message, I\u0027d like to have both \u0027best\u0027/\u0027top\u0027 and \u0027same\u0027 to be mentioned","commit_id":"95bef1e25e273de1f5986e9b5561921d84e5a990"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"0a611cdbecb2af167e4aea1debebf4d625cb1be3","unresolved":false,"context_lines":[{"line_number":482,"context_line":"        \"shuffle_equal_top_weighed_hosts\","},{"line_number":483,"context_line":"        default\u003dFalse,"},{"line_number":484,"context_line":"        help\u003d\"\"\""},{"line_number":485,"context_line":"Enable spreading the instances between hosts with the same best weight."},{"line_number":486,"context_line":""},{"line_number":487,"context_line":"Enabling it has maximal effect for cases when host_subset_size is 1"},{"line_number":488,"context_line":"(default), but there is a large number of hosts with identical maximal weight"}],"source_content_type":"text/x-python","patch_set":5,"id":"9f436f4f_4226296a","line":485,"range":{"start_line":485,"start_character":59,"end_line":485,"end_character":63},"updated":"2017-08-17 09:29:36.000000000","message":"s/best //","commit_id":"95bef1e25e273de1f5986e9b5561921d84e5a990"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"0a611cdbecb2af167e4aea1debebf4d625cb1be3","unresolved":false,"context_lines":[{"line_number":484,"context_line":"        help\u003d\"\"\""},{"line_number":485,"context_line":"Enable spreading the instances between hosts with the same best weight."},{"line_number":486,"context_line":""},{"line_number":487,"context_line":"Enabling it has maximal effect for cases when host_subset_size is 1"},{"line_number":488,"context_line":"(default), but there is a large number of hosts with identical maximal weight"},{"line_number":489,"context_line":"considered as best fit for target (e.g. ironic), in which case it will"},{"line_number":490,"context_line":"reduce contention and chances for rescheduling events."}],"source_content_type":"text/x-python","patch_set":5,"id":"9f436f4f_e21e3d0a","line":487,"range":{"start_line":487,"start_character":16,"end_line":487,"end_character":23},"updated":"2017-08-17 09:29:36.000000000","message":"s/maximal/a beneficial/","commit_id":"95bef1e25e273de1f5986e9b5561921d84e5a990"},{"author":{"_account_id":9542,"name":"Pavlo Shchelokovskyy","email":"pshchelokovskyy@mirantis.com","username":"pshchelo"},"change_message_id":"591088db39d50b86f06c083419f08eeebe662e18","unresolved":false,"context_lines":[{"line_number":484,"context_line":"        help\u003d\"\"\""},{"line_number":485,"context_line":"Enable spreading the instances between hosts with the same best weight."},{"line_number":486,"context_line":""},{"line_number":487,"context_line":"Enabling it has maximal effect for cases when host_subset_size is 1"},{"line_number":488,"context_line":"(default), but there is a large number of hosts with identical maximal weight"},{"line_number":489,"context_line":"considered as best fit for target (e.g. ironic), in which case it will"},{"line_number":490,"context_line":"reduce contention and chances for rescheduling events."}],"source_content_type":"text/x-python","patch_set":5,"id":"9f436f4f_bd05f415","line":487,"range":{"start_line":487,"start_character":16,"end_line":487,"end_character":23},"in_reply_to":"9f436f4f_e21e3d0a","updated":"2017-08-17 10:46:24.000000000","message":"agree.","commit_id":"95bef1e25e273de1f5986e9b5561921d84e5a990"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"0a611cdbecb2af167e4aea1debebf4d625cb1be3","unresolved":false,"context_lines":[{"line_number":485,"context_line":"Enable spreading the instances between hosts with the same best weight."},{"line_number":486,"context_line":""},{"line_number":487,"context_line":"Enabling it has maximal effect for cases when host_subset_size is 1"},{"line_number":488,"context_line":"(default), but there is a large number of hosts with identical maximal weight"},{"line_number":489,"context_line":"considered as best fit for target (e.g. ironic), in which case it will"},{"line_number":490,"context_line":"reduce contention and chances for rescheduling events."},{"line_number":491,"context_line":"At the same time it will make the instance packing (even in unweighed case)"}],"source_content_type":"text/x-python","patch_set":5,"id":"9f436f4f_62d80d52","line":488,"range":{"start_line":488,"start_character":53,"end_line":488,"end_character":70},"updated":"2017-08-17 09:29:36.000000000","message":"s/identical maximal/same/","commit_id":"95bef1e25e273de1f5986e9b5561921d84e5a990"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"0a611cdbecb2af167e4aea1debebf4d625cb1be3","unresolved":false,"context_lines":[{"line_number":486,"context_line":""},{"line_number":487,"context_line":"Enabling it has maximal effect for cases when host_subset_size is 1"},{"line_number":488,"context_line":"(default), but there is a large number of hosts with identical maximal weight"},{"line_number":489,"context_line":"considered as best fit for target (e.g. ironic), in which case it will"},{"line_number":490,"context_line":"reduce contention and chances for rescheduling events."},{"line_number":491,"context_line":"At the same time it will make the instance packing (even in unweighed case)"},{"line_number":492,"context_line":"less dense."}],"source_content_type":"text/x-python","patch_set":5,"id":"9f436f4f_62c12d54","line":489,"range":{"start_line":489,"start_character":34,"end_line":489,"end_character":47},"updated":"2017-08-17 09:29:36.000000000","message":"s/(e.g. ironic)/. This scenario is common in Ironic deployments where there are typically many baremetal nodes returned with identical weights to the scheduler./","commit_id":"95bef1e25e273de1f5986e9b5561921d84e5a990"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"0a611cdbecb2af167e4aea1debebf4d625cb1be3","unresolved":false,"context_lines":[{"line_number":486,"context_line":""},{"line_number":487,"context_line":"Enabling it has maximal effect for cases when host_subset_size is 1"},{"line_number":488,"context_line":"(default), but there is a large number of hosts with identical maximal weight"},{"line_number":489,"context_line":"considered as best fit for target (e.g. ironic), in which case it will"},{"line_number":490,"context_line":"reduce contention and chances for rescheduling events."},{"line_number":491,"context_line":"At the same time it will make the instance packing (even in unweighed case)"},{"line_number":492,"context_line":"less dense."}],"source_content_type":"text/x-python","patch_set":5,"id":"9f436f4f_22de853d","line":489,"range":{"start_line":489,"start_character":0,"end_line":489,"end_character":33},"updated":"2017-08-17 09:29:36.000000000","message":"s/considered as best fit for target//","commit_id":"95bef1e25e273de1f5986e9b5561921d84e5a990"},{"author":{"_account_id":9542,"name":"Pavlo Shchelokovskyy","email":"pshchelokovskyy@mirantis.com","username":"pshchelo"},"change_message_id":"591088db39d50b86f06c083419f08eeebe662e18","unresolved":false,"context_lines":[{"line_number":486,"context_line":""},{"line_number":487,"context_line":"Enabling it has maximal effect for cases when host_subset_size is 1"},{"line_number":488,"context_line":"(default), but there is a large number of hosts with identical maximal weight"},{"line_number":489,"context_line":"considered as best fit for target (e.g. ironic), in which case it will"},{"line_number":490,"context_line":"reduce contention and chances for rescheduling events."},{"line_number":491,"context_line":"At the same time it will make the instance packing (even in unweighed case)"},{"line_number":492,"context_line":"less dense."}],"source_content_type":"text/x-python","patch_set":5,"id":"9f436f4f_dd0af823","line":489,"range":{"start_line":489,"start_character":34,"end_line":489,"end_character":47},"in_reply_to":"9f436f4f_62c12d54","updated":"2017-08-17 10:46:24.000000000","message":"will do","commit_id":"95bef1e25e273de1f5986e9b5561921d84e5a990"}],"nova/scheduler/filter_scheduler.py":[{"author":{"_account_id":9542,"name":"Pavlo Shchelokovskyy","email":"pshchelokovskyy@mirantis.com","username":"pshchelo"},"change_message_id":"e6dbaa41d87b4030c7e7b51647fbe3775edb0612","unresolved":false,"context_lines":[{"line_number":302,"context_line":""},{"line_number":303,"context_line":"        weighed_hosts \u003d self.host_manager.get_weighed_hosts(filtered_hosts,"},{"line_number":304,"context_line":"            spec_obj)"},{"line_number":305,"context_line":"        # randomize best hosts,"},{"line_number":306,"context_line":"        # relying on weighed hosts being already sorted by weight"},{"line_number":307,"context_line":"        best_hosts \u003d [w for w in weighed_hosts"},{"line_number":308,"context_line":"                      if w.weight \u003d\u003d weighed_hosts[0].weight]"},{"line_number":309,"context_line":"        random.shuffle(best_hosts)"},{"line_number":310,"context_line":"        weighed_hosts \u003d best_hosts + weighed_hosts[len(best_hosts):]"},{"line_number":311,"context_line":"        # Strip off the WeighedHost wrapper class..."},{"line_number":312,"context_line":"        weighed_hosts \u003d [h.obj for h in weighed_hosts]"},{"line_number":313,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"9f436f4f_01903f49","line":310,"range":{"start_line":305,"start_character":0,"end_line":310,"end_character":68},"updated":"2017-08-16 09:15:32.000000000","message":"this could probably be better to implement as pluggable filter added to the end of the filtering pipeline (I would argue by default :) ) which would make it possible to turn it off if really needed","commit_id":"41a4d6f71c552a6acba641c46e459d417cf0cce8"},{"author":{"_account_id":9542,"name":"Pavlo Shchelokovskyy","email":"pshchelokovskyy@mirantis.com","username":"pshchelo"},"change_message_id":"4a6067165191b9781b8e58a61ed05a4dffbf6495","unresolved":false,"context_lines":[{"line_number":302,"context_line":""},{"line_number":303,"context_line":"        weighed_hosts \u003d self.host_manager.get_weighed_hosts(filtered_hosts,"},{"line_number":304,"context_line":"            spec_obj)"},{"line_number":305,"context_line":"        # randomize best hosts,"},{"line_number":306,"context_line":"        # relying on weighed hosts being already sorted by weight"},{"line_number":307,"context_line":"        best_hosts \u003d [w for w in weighed_hosts"},{"line_number":308,"context_line":"                      if w.weight \u003d\u003d weighed_hosts[0].weight]"},{"line_number":309,"context_line":"        random.shuffle(best_hosts)"},{"line_number":310,"context_line":"        weighed_hosts \u003d best_hosts + weighed_hosts[len(best_hosts):]"},{"line_number":311,"context_line":"        # Strip off the WeighedHost wrapper class..."},{"line_number":312,"context_line":"        weighed_hosts \u003d [h.obj for h in weighed_hosts]"},{"line_number":313,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"9f436f4f_1c654246","line":310,"range":{"start_line":305,"start_character":0,"end_line":310,"end_character":68},"in_reply_to":"9f436f4f_01903f49","updated":"2017-08-16 10:01:45.000000000","message":"I\u0027ve considered moving this logic to a separate weigher, but it seems not possible, or at least too fragile - contrary to filters, weighers do not have a well defined order of application, and I do want the shuffle to be the last step.\n\nSo the best we could probably do to make this configurable is to introduce an extra boolean config option, and execute this code piece when it is set to true (again, I would argue to enable it by default).","commit_id":"41a4d6f71c552a6acba641c46e459d417cf0cce8"},{"author":{"_account_id":21813,"name":"Andrey Volkov","email":"m@amadev.ru","username":"avolkov"},"change_message_id":"fa2933ff6c7c8547bce9e23890526ddb5966cb9e","unresolved":false,"context_lines":[{"line_number":302,"context_line":""},{"line_number":303,"context_line":"        weighed_hosts \u003d self.host_manager.get_weighed_hosts(filtered_hosts,"},{"line_number":304,"context_line":"            spec_obj)"},{"line_number":305,"context_line":"        # randomize best hosts,"},{"line_number":306,"context_line":"        # relying on weighed hosts being already sorted by weight"},{"line_number":307,"context_line":"        best_hosts \u003d [w for w in weighed_hosts"},{"line_number":308,"context_line":"                      if w.weight \u003d\u003d weighed_hosts[0].weight]"},{"line_number":309,"context_line":"        random.shuffle(best_hosts)"},{"line_number":310,"context_line":"        weighed_hosts \u003d best_hosts + weighed_hosts[len(best_hosts):]"},{"line_number":311,"context_line":"        # Strip off the WeighedHost wrapper class..."},{"line_number":312,"context_line":"        weighed_hosts \u003d [h.obj for h in weighed_hosts]"},{"line_number":313,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"9f436f4f_21090395","line":310,"range":{"start_line":305,"start_character":0,"end_line":310,"end_character":68},"in_reply_to":"9f436f4f_01903f49","updated":"2017-08-16 09:21:34.000000000","message":"We need to do this only if host_subset_size \u003c len(weighed_hosts), right? How about to move block inside condition to show your intention more evidently?","commit_id":"41a4d6f71c552a6acba641c46e459d417cf0cce8"},{"author":{"_account_id":9542,"name":"Pavlo Shchelokovskyy","email":"pshchelokovskyy@mirantis.com","username":"pshchelo"},"change_message_id":"4a6067165191b9781b8e58a61ed05a4dffbf6495","unresolved":false,"context_lines":[{"line_number":302,"context_line":""},{"line_number":303,"context_line":"        weighed_hosts \u003d self.host_manager.get_weighed_hosts(filtered_hosts,"},{"line_number":304,"context_line":"            spec_obj)"},{"line_number":305,"context_line":"        # randomize best hosts,"},{"line_number":306,"context_line":"        # relying on weighed hosts being already sorted by weight"},{"line_number":307,"context_line":"        best_hosts \u003d [w for w in weighed_hosts"},{"line_number":308,"context_line":"                      if w.weight \u003d\u003d weighed_hosts[0].weight]"},{"line_number":309,"context_line":"        random.shuffle(best_hosts)"},{"line_number":310,"context_line":"        weighed_hosts \u003d best_hosts + weighed_hosts[len(best_hosts):]"},{"line_number":311,"context_line":"        # Strip off the WeighedHost wrapper class..."},{"line_number":312,"context_line":"        weighed_hosts \u003d [h.obj for h in weighed_hosts]"},{"line_number":313,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"9f436f4f_fc7efee1","line":310,"range":{"start_line":305,"start_character":0,"end_line":310,"end_character":68},"in_reply_to":"9f436f4f_21090395","updated":"2017-08-16 10:01:45.000000000","message":"not really, especially for ironic since it returns the nodes always in the same order, and they usually would have the same weight (especially when scheduling happens on resource class). I do want the best weighed hosts to be always be shuffled regardless of host_subset_size vs weighed hosts length.","commit_id":"41a4d6f71c552a6acba641c46e459d417cf0cce8"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"dab5e66260bee969332493ca070bbb3faa2a96c6","unresolved":false,"context_lines":[{"line_number":302,"context_line":""},{"line_number":303,"context_line":"        weighed_hosts \u003d self.host_manager.get_weighed_hosts(filtered_hosts,"},{"line_number":304,"context_line":"            spec_obj)"},{"line_number":305,"context_line":"        # randomize best hosts,"},{"line_number":306,"context_line":"        # relying on weighed hosts being already sorted by weight"},{"line_number":307,"context_line":"        best_hosts \u003d [w for w in weighed_hosts"},{"line_number":308,"context_line":"                      if w.weight \u003d\u003d weighed_hosts[0].weight]"},{"line_number":309,"context_line":"        random.shuffle(best_hosts)"},{"line_number":310,"context_line":"        weighed_hosts \u003d best_hosts + weighed_hosts[len(best_hosts):]"},{"line_number":311,"context_line":"        # Strip off the WeighedHost wrapper class..."},{"line_number":312,"context_line":"        weighed_hosts \u003d [h.obj for h in weighed_hosts]"},{"line_number":313,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"9f436f4f_f9004b04","line":310,"range":{"start_line":305,"start_character":0,"end_line":310,"end_character":68},"in_reply_to":"9f436f4f_fc7efee1","updated":"2017-08-16 13:20:11.000000000","message":"I\u0027d reword the comment a bit:\n\n  # shuffle the first couple of hosts of the same weight\n  # to enhance UX when a deterministic driver (ironic)\n  # always returns the nodes in the same order\n\nHaving said that, is there any reason not to do this (explicitly for every driver)?","commit_id":"41a4d6f71c552a6acba641c46e459d417cf0cce8"},{"author":{"_account_id":21813,"name":"Andrey Volkov","email":"m@amadev.ru","username":"avolkov"},"change_message_id":"089eae047ecb8d14e7c1950b4b8c3c27718ec858","unresolved":false,"context_lines":[{"line_number":302,"context_line":""},{"line_number":303,"context_line":"        weighed_hosts \u003d self.host_manager.get_weighed_hosts(filtered_hosts,"},{"line_number":304,"context_line":"            spec_obj)"},{"line_number":305,"context_line":"        # randomize best hosts,"},{"line_number":306,"context_line":"        # relying on weighed hosts being already sorted by weight"},{"line_number":307,"context_line":"        best_hosts \u003d [w for w in weighed_hosts"},{"line_number":308,"context_line":"                      if w.weight \u003d\u003d weighed_hosts[0].weight]"},{"line_number":309,"context_line":"        random.shuffle(best_hosts)"},{"line_number":310,"context_line":"        weighed_hosts \u003d best_hosts + weighed_hosts[len(best_hosts):]"},{"line_number":311,"context_line":"        # Strip off the WeighedHost wrapper class..."},{"line_number":312,"context_line":"        weighed_hosts \u003d [h.obj for h in weighed_hosts]"},{"line_number":313,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"9f436f4f_bcc19156","line":310,"range":{"start_line":305,"start_character":0,"end_line":310,"end_character":68},"in_reply_to":"9f436f4f_fc7efee1","updated":"2017-08-16 13:35:05.000000000","message":"random.choice make the same logic job as randon.shuffle if weighed_hosts are not truncated, so IMO you are doing not required additional work.","commit_id":"41a4d6f71c552a6acba641c46e459d417cf0cce8"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"1e0bab907542b963064c12cb283c36fe6ac2d156","unresolved":false,"context_lines":[{"line_number":303,"context_line":"        weighed_hosts \u003d self.host_manager.get_weighed_hosts(filtered_hosts,"},{"line_number":304,"context_line":"            spec_obj)"},{"line_number":305,"context_line":"        # randomize best hosts,"},{"line_number":306,"context_line":"        # relying on weighed hosts being already sorted by weight"},{"line_number":307,"context_line":"        best_hosts \u003d [w for w in weighed_hosts"},{"line_number":308,"context_line":"                      if w.weight \u003d\u003d weighed_hosts[0].weight]"},{"line_number":309,"context_line":"        random.shuffle(best_hosts)"}],"source_content_type":"text/x-python","patch_set":2,"id":"9f436f4f_07b28a49","line":306,"updated":"2017-08-16 13:59:30.000000000","message":"Could you add a bit more to the above comment that explains this addresses situations where there are a large number of same-weighted hosts and this helps reduce contention?","commit_id":"e01cb82021317b6dea67f1b4cea7498d3f69d8f3"},{"author":{"_account_id":9542,"name":"Pavlo Shchelokovskyy","email":"pshchelokovskyy@mirantis.com","username":"pshchelo"},"change_message_id":"2f3ece4a706a2f0526aa088a65848a99e1b3f9e3","unresolved":false,"context_lines":[{"line_number":303,"context_line":"        weighed_hosts \u003d self.host_manager.get_weighed_hosts(filtered_hosts,"},{"line_number":304,"context_line":"            spec_obj)"},{"line_number":305,"context_line":"        # randomize best hosts,"},{"line_number":306,"context_line":"        # relying on weighed hosts being already sorted by weight"},{"line_number":307,"context_line":"        best_hosts \u003d [w for w in weighed_hosts"},{"line_number":308,"context_line":"                      if w.weight \u003d\u003d weighed_hosts[0].weight]"},{"line_number":309,"context_line":"        random.shuffle(best_hosts)"}],"source_content_type":"text/x-python","patch_set":2,"id":"9f436f4f_2dfc4d3c","line":306,"in_reply_to":"9f436f4f_07b28a49","updated":"2017-08-16 15:15:14.000000000","message":"Done","commit_id":"e01cb82021317b6dea67f1b4cea7498d3f69d8f3"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"0a611cdbecb2af167e4aea1debebf4d625cb1be3","unresolved":false,"context_lines":[{"line_number":306,"context_line":"            # NOTE(pas-ha) Randomize best hosts, relying on weighed_hosts"},{"line_number":307,"context_line":"            # being already sorted by weight in descending order."},{"line_number":308,"context_line":"            # This decreases possible contention and rescheduling attempts"},{"line_number":309,"context_line":"            # when there is a big number of hosts with an equal max weight,"},{"line_number":310,"context_line":"            # especially so when host_subset_size is 1 (default)"},{"line_number":311,"context_line":"            best_hosts \u003d [w for w in weighed_hosts"},{"line_number":312,"context_line":"                          if w.weight \u003d\u003d weighed_hosts[0].weight]"}],"source_content_type":"text/x-python","patch_set":5,"id":"9f436f4f_22ac459d","line":309,"range":{"start_line":309,"start_character":55,"end_line":309,"end_character":68},"updated":"2017-08-17 09:29:36.000000000","message":"s/an equal max/the same/","commit_id":"95bef1e25e273de1f5986e9b5561921d84e5a990"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"0a611cdbecb2af167e4aea1debebf4d625cb1be3","unresolved":false,"context_lines":[{"line_number":306,"context_line":"            # NOTE(pas-ha) Randomize best hosts, relying on weighed_hosts"},{"line_number":307,"context_line":"            # being already sorted by weight in descending order."},{"line_number":308,"context_line":"            # This decreases possible contention and rescheduling attempts"},{"line_number":309,"context_line":"            # when there is a big number of hosts with an equal max weight,"},{"line_number":310,"context_line":"            # especially so when host_subset_size is 1 (default)"},{"line_number":311,"context_line":"            best_hosts \u003d [w for w in weighed_hosts"},{"line_number":312,"context_line":"                          if w.weight \u003d\u003d weighed_hosts[0].weight]"}],"source_content_type":"text/x-python","patch_set":5,"id":"9f436f4f_a2c27551","line":309,"range":{"start_line":309,"start_character":30,"end_line":309,"end_character":33},"updated":"2017-08-17 09:29:36.000000000","message":"s/big/large/","commit_id":"95bef1e25e273de1f5986e9b5561921d84e5a990"}],"releasenotes/notes/shuffle-best-hosts-447c1703a5d6d140.yaml":[{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"70cf91f8d3306bb190b73664c0695f56ccac9d8f","unresolved":false,"context_lines":[{"line_number":11,"context_line":"    classes). In this case enabling it will decrease the number of"},{"line_number":12,"context_line":"    rescheduling events."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"    On the other hand, enabling it will make packing of VMs on hypervizors"},{"line_number":15,"context_line":"    less dence even when host weighing is disabled."}],"source_content_type":"text/x-yaml","patch_set":7,"id":"ff82abbf_c6b8c7c9","line":14,"range":{"start_line":14,"start_character":63,"end_line":14,"end_character":74},"updated":"2017-11-22 12:43:55.000000000","message":"hypervisors","commit_id":"3759f105a7c4c3029a81a5431434190ef1bbb020"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"70cf91f8d3306bb190b73664c0695f56ccac9d8f","unresolved":false,"context_lines":[{"line_number":12,"context_line":"    rescheduling events."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"    On the other hand, enabling it will make packing of VMs on hypervizors"},{"line_number":15,"context_line":"    less dence even when host weighing is disabled."}],"source_content_type":"text/x-yaml","patch_set":7,"id":"ff82abbf_06ad4f87","line":15,"range":{"start_line":15,"start_character":9,"end_line":15,"end_character":14},"updated":"2017-11-22 12:43:55.000000000","message":"dense","commit_id":"3759f105a7c4c3029a81a5431434190ef1bbb020"}]}
