)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":4146,"name":"Clark Boylan","email":"cboylan@sapwetik.org","username":"cboylan"},"change_message_id":"2a17c5cb4ec82a6f882a18e44b23270dd23aca0e","unresolved":true,"context_lines":[{"line_number":12,"context_line":"request when it isn\u0027t necessary."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"However, in systems with large numbers of nodes, this can be a"},{"line_number":15,"context_line":"very expensive operation.  Meanwhile, by introducing the tree"},{"line_number":16,"context_line":"cache, we have attempted to make the cache as fast as possible"},{"line_number":17,"context_line":"and therefore more likely to be up-to-date (especially in a"},{"line_number":18,"context_line":"smaller system where this would matter more)."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"f7ee63fe_c575e371","line":15,"updated":"2024-06-25 23:28:10.000000000","message":"Another approach that might help alleviate the cost of doing this is if we carried some extra state in zk that indicates if we believe min ready is met for a label. Then we could just read N values per label rather than the entire node state.\n\nThat said I suspect this is probably fine due to zk cache watchers generally keeping things up to date for us. createMinReady() is called in the main run loop and there is enough other work happening in that loop that we should be checking this infrequently enough that the race between watcher updates and creating more nodes isn\u0027t super likely (but still possible).","commit_id":"7fbcb13f8a176903f91d83fc72ce1c59da3e64c2"},{"author":{"_account_id":1,"name":"James E. Blair","email":"jim@acmegating.com","username":"corvus"},"change_message_id":"64d6da54ae114aa09ccece7e9b82ad969b08ca7c","unresolved":false,"context_lines":[{"line_number":12,"context_line":"request when it isn\u0027t necessary."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"However, in systems with large numbers of nodes, this can be a"},{"line_number":15,"context_line":"very expensive operation.  Meanwhile, by introducing the tree"},{"line_number":16,"context_line":"cache, we have attempted to make the cache as fast as possible"},{"line_number":17,"context_line":"and therefore more likely to be up-to-date (especially in a"},{"line_number":18,"context_line":"smaller system where this would matter more)."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"f28c1ec8_84f45752","line":15,"in_reply_to":"f7ee63fe_c575e371","updated":"2024-06-25 23:32:19.000000000","message":"That\u0027s a good idea; I don\u0027t think there\u0027s an existing place for that, but maybe we could keep an eye out for an opportunity to do that with NIZ.","commit_id":"7fbcb13f8a176903f91d83fc72ce1c59da3e64c2"}],"/PATCHSET_LEVEL":[{"author":{"_account_id":4146,"name":"Clark Boylan","email":"cboylan@sapwetik.org","username":"cboylan"},"change_message_id":"2a17c5cb4ec82a6f882a18e44b23270dd23aca0e","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"25d14c0a_f7af41ca","updated":"2024-06-25 23:28:10.000000000","message":"Not approving as I think the two ideas inline are worth considering before we move ahead. But I\u0027m ok with moving ahead with this as is. Should probably try and monitor whether or not OpenDev ends up with many more min ready nodes than anticipated. We currently set min ready to 1 for most things that we don\u0027t set to 0, the exception to that is ubuntu-jammy which is set to 10. I think this means it should be pretty easy to see if we\u0027re over provisioning particularly over weekends when there is less demand from code review activity.","commit_id":"7fbcb13f8a176903f91d83fc72ce1c59da3e64c2"}],"nodepool/launcher.py":[{"author":{"_account_id":4146,"name":"Clark Boylan","email":"cboylan@sapwetik.org","username":"cboylan"},"change_message_id":"2a17c5cb4ec82a6f882a18e44b23270dd23aca0e","unresolved":true,"context_lines":[{"line_number":1306,"context_line":"                self.log.info(\"Creating requests for %d %s nodes\","},{"line_number":1307,"context_line":"                              need, label.name)"},{"line_number":1308,"context_line":"                for i in range(0, need):"},{"line_number":1309,"context_line":"                    createRequest(label.name)"},{"line_number":1310,"context_line":""},{"line_number":1311,"context_line":"    def _localStats(self):"},{"line_number":1312,"context_line":"        if not self.statsd:"}],"source_content_type":"text/x-python","patch_set":1,"id":"8bf09c8d_26e6c9c4","line":1309,"updated":"2024-06-25 23:28:10.000000000","message":"Another approach for reducing the chances of over creating nodes may be to only create one node per createMinReady call. Basically force nodepool to intentionally be a bit slower at approaching the min ready value. This might make min ready less responsive than some installations would like though. I think it would work for opendev as we generally use min-ready 1 and not large values.","commit_id":"7fbcb13f8a176903f91d83fc72ce1c59da3e64c2"},{"author":{"_account_id":1,"name":"James E. Blair","email":"jim@acmegating.com","username":"corvus"},"change_message_id":"64d6da54ae114aa09ccece7e9b82ad969b08ca7c","unresolved":false,"context_lines":[{"line_number":1306,"context_line":"                self.log.info(\"Creating requests for %d %s nodes\","},{"line_number":1307,"context_line":"                              need, label.name)"},{"line_number":1308,"context_line":"                for i in range(0, need):"},{"line_number":1309,"context_line":"                    createRequest(label.name)"},{"line_number":1310,"context_line":""},{"line_number":1311,"context_line":"    def _localStats(self):"},{"line_number":1312,"context_line":"        if not self.statsd:"}],"source_content_type":"text/x-python","patch_set":1,"id":"72ed4789_e19b05e7","line":1309,"in_reply_to":"8bf09c8d_26e6c9c4","updated":"2024-06-25 23:32:19.000000000","message":"Good idea.  Maybe if we see problems with this, we could implement that.","commit_id":"7fbcb13f8a176903f91d83fc72ce1c59da3e64c2"}]}
