)]}'
{"doc/source/admin/config-wsgi.rst":[{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"1fafde61e8989741b57146c074397afc44257807","unresolved":false,"context_lines":[{"line_number":148,"context_line":"For rpc_workers, there needs to be enough to keep up with incoming"},{"line_number":149,"context_line":"events from the various neutron agents. Signs that there are too few"},{"line_number":150,"context_line":"can be agent heartbeats arriving late, or nova vif binding timing out"},{"line_number":151,"context_line":"on the hypervisors."}],"source_content_type":"text/x-rst","patch_set":5,"id":"9fdfeff1_58e89fe0","line":151,"updated":"2019-02-15 08:00:23.000000000","message":"also rpc message timeout exceptions in agents\u0027 logs is very clear sign that there is too few rpc workers,","commit_id":"91b399e15104827bdf1a08da5380c9f62b0b4e57"},{"author":{"_account_id":10980,"name":"Doug Wiegley","email":"dougwig@parkside.io","username":"dougw"},"change_message_id":"eee1a65a185dd797a3292f1dda36a602499b360b","unresolved":false,"context_lines":[{"line_number":148,"context_line":"For rpc_workers, there needs to be enough to keep up with incoming"},{"line_number":149,"context_line":"events from the various neutron agents. Signs that there are too few"},{"line_number":150,"context_line":"can be agent heartbeats arriving late, or nova vif binding timing out"},{"line_number":151,"context_line":"on the hypervisors."}],"source_content_type":"text/x-rst","patch_set":5,"id":"9fdfeff1_b632f20e","line":151,"in_reply_to":"9fdfeff1_58e89fe0","updated":"2019-02-15 18:10:40.000000000","message":"Done","commit_id":"91b399e15104827bdf1a08da5380c9f62b0b4e57"}],"neutron/cmd/upgrade_checks/checks.py":[{"author":{"_account_id":13995,"name":"Nate Johnston","email":"nate.johnston@redhat.com","username":"natejohnston"},"change_message_id":"820cb98181a075cea9a3c7e70e577dafe83a287a","unresolved":false,"context_lines":[{"line_number":14,"context_line":""},{"line_number":15,"context_line":"try:"},{"line_number":16,"context_line":"    import configparser"},{"line_number":17,"context_line":"except ImportError as e:"},{"line_number":18,"context_line":"    import ConfigParser as configparser"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"from oslo_config import cfg"}],"source_content_type":"text/x-python","patch_set":6,"id":"9fdfeff1_87b53a80","line":17,"updated":"2019-02-15 20:23:41.000000000","message":"nit: I think you could omit the \"as e\" here since we aren\u0027t using the value.","commit_id":"9327c5c78f3835696b6681f0ce084a2df5e1c7a4"},{"author":{"_account_id":10980,"name":"Doug Wiegley","email":"dougwig@parkside.io","username":"dougw"},"change_message_id":"37cf7ecd5be926d4c8400db93967d8e764e9e238","unresolved":false,"context_lines":[{"line_number":14,"context_line":""},{"line_number":15,"context_line":"try:"},{"line_number":16,"context_line":"    import configparser"},{"line_number":17,"context_line":"except ImportError as e:"},{"line_number":18,"context_line":"    import ConfigParser as configparser"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"from oslo_config import cfg"}],"source_content_type":"text/x-python","patch_set":6,"id":"9fdfeff1_ffa36641","line":17,"in_reply_to":"9fdfeff1_87b53a80","updated":"2019-02-16 02:11:30.000000000","message":"Done","commit_id":"9327c5c78f3835696b6681f0ce084a2df5e1c7a4"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"f56fea4110aa9a005707667878924ff44a0461f4","unresolved":false,"context_lines":[{"line_number":33,"context_line":""},{"line_number":34,"context_line":"    @staticmethod"},{"line_number":35,"context_line":"    def worker_count_check(checker):"},{"line_number":36,"context_line":"        files \u003d cfg.find_config_files(project\u003d\u0027neutron\u0027)"},{"line_number":37,"context_line":"        parser \u003d configparser.RawConfigParser()"},{"line_number":38,"context_line":"        parser.read(files)"},{"line_number":39,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"9fdfeff1_06e943e1","line":36,"updated":"2019-02-16 20:59:33.000000000","message":"I already proposed patch which would load some neutron configs: https://review.openstack.org/#/c/637204/ - do You think that this way with finding config files will be better? IIUC find_config_files() will only look for default files so it will not find e.g. options from ml2 config file, right?","commit_id":"4967f5a3b5b56f60fb1846f7786369bb2de48ce6"},{"author":{"_account_id":10980,"name":"Doug Wiegley","email":"dougwig@parkside.io","username":"dougw"},"change_message_id":"acec00e764705859e1d65af3156b479b97a70e3e","unresolved":false,"context_lines":[{"line_number":33,"context_line":""},{"line_number":34,"context_line":"    @staticmethod"},{"line_number":35,"context_line":"    def worker_count_check(checker):"},{"line_number":36,"context_line":"        files \u003d cfg.find_config_files(project\u003d\u0027neutron\u0027)"},{"line_number":37,"context_line":"        parser \u003d configparser.RawConfigParser()"},{"line_number":38,"context_line":"        parser.read(files)"},{"line_number":39,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"9fdfeff1_457bc079","line":36,"in_reply_to":"9fdfeff1_06e943e1","updated":"2019-02-17 05:36:26.000000000","message":"I think your way is much better, but I couldn’t find a way via oslomcodnig to know whether I was getting a default value or not. Although now that I’ve typed that, the default for those two is None, so I can use that. I’ll switch.","commit_id":"4967f5a3b5b56f60fb1846f7786369bb2de48ce6"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"60d9395d50f2aff42db71fb4209fdb1a4fa11637","unresolved":false,"context_lines":[{"line_number":33,"context_line":""},{"line_number":34,"context_line":"    @staticmethod"},{"line_number":35,"context_line":"    def worker_count_check(checker):"},{"line_number":36,"context_line":"        files \u003d cfg.find_config_files(project\u003d\u0027neutron\u0027)"},{"line_number":37,"context_line":"        parser \u003d configparser.RawConfigParser()"},{"line_number":38,"context_line":"        parser.read(files)"},{"line_number":39,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"9fdfeff1_8838dd9f","line":36,"in_reply_to":"9fdfeff1_457bc079","updated":"2019-02-17 12:29:49.000000000","message":"Yes, you can directly rebase on that.","commit_id":"4967f5a3b5b56f60fb1846f7786369bb2de48ce6"},{"author":{"_account_id":10980,"name":"Doug Wiegley","email":"dougwig@parkside.io","username":"dougw"},"change_message_id":"8642f90c3d8c163d0809d98543dc79312a130512","unresolved":false,"context_lines":[{"line_number":33,"context_line":""},{"line_number":34,"context_line":"    @staticmethod"},{"line_number":35,"context_line":"    def worker_count_check(checker):"},{"line_number":36,"context_line":"        files \u003d cfg.find_config_files(project\u003d\u0027neutron\u0027)"},{"line_number":37,"context_line":"        parser \u003d configparser.RawConfigParser()"},{"line_number":38,"context_line":"        parser.read(files)"},{"line_number":39,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"9fdfeff1_7fa209b0","line":36,"in_reply_to":"9fdfeff1_8838dd9f","updated":"2019-02-18 06:39:05.000000000","message":"Done","commit_id":"4967f5a3b5b56f60fb1846f7786369bb2de48ce6"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"992bf9c0b2cb7c6f78cec1ddd2cee847859c1f76","unresolved":false,"context_lines":[{"line_number":29,"context_line":""},{"line_number":30,"context_line":"    @staticmethod"},{"line_number":31,"context_line":"    def worker_count_check(checker):"},{"line_number":32,"context_line":"        conf_service.register_service_opts(conf_service.service_opts, cfg.CONF)"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"        if cfg.CONF.api_workers and cfg.CONF.rpc_workers:"},{"line_number":35,"context_line":"            return upgradecheck.Result("}],"source_content_type":"text/x-python","patch_set":8,"id":"9fdfeff1_3bc0f57c","line":32,"updated":"2019-02-19 13:07:04.000000000","message":"Now, when https://review.openstack.org/#/c/637204/ is merged I think You don\u0027t need to register options here. Maybe You can add register in neutron.cmd.status module, like it is done already for some basic options?","commit_id":"e3a4a2b4b26fa1cf653d08d1ab1b0822f8560ae3"},{"author":{"_account_id":10980,"name":"Doug Wiegley","email":"dougwig@parkside.io","username":"dougw"},"change_message_id":"a29f1712dbef127f4fe66106533b32f464286778","unresolved":false,"context_lines":[{"line_number":29,"context_line":""},{"line_number":30,"context_line":"    @staticmethod"},{"line_number":31,"context_line":"    def worker_count_check(checker):"},{"line_number":32,"context_line":"        conf_service.register_service_opts(conf_service.service_opts, cfg.CONF)"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"        if cfg.CONF.api_workers and cfg.CONF.rpc_workers:"},{"line_number":35,"context_line":"            return upgradecheck.Result("}],"source_content_type":"text/x-python","patch_set":8,"id":"9fdfeff1_6f06b21f","line":32,"in_reply_to":"9fdfeff1_3bc0f57c","updated":"2019-02-19 17:56:43.000000000","message":"Cool, let me try that.","commit_id":"e3a4a2b4b26fa1cf653d08d1ab1b0822f8560ae3"},{"author":{"_account_id":10980,"name":"Doug Wiegley","email":"dougwig@parkside.io","username":"dougw"},"change_message_id":"13d7a32a22e7c67aea8199c6a63a2505b4c54cb2","unresolved":false,"context_lines":[{"line_number":29,"context_line":""},{"line_number":30,"context_line":"    @staticmethod"},{"line_number":31,"context_line":"    def worker_count_check(checker):"},{"line_number":32,"context_line":"        conf_service.register_service_opts(conf_service.service_opts, cfg.CONF)"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"        if cfg.CONF.api_workers and cfg.CONF.rpc_workers:"},{"line_number":35,"context_line":"            return upgradecheck.Result("}],"source_content_type":"text/x-python","patch_set":8,"id":"9fdfeff1_afed7a8f","line":32,"in_reply_to":"9fdfeff1_6f06b21f","updated":"2019-02-19 18:34:26.000000000","message":"Done","commit_id":"e3a4a2b4b26fa1cf653d08d1ab1b0822f8560ae3"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"d0ae5424c428fa28fe773470a14b90fcd31330a7","unresolved":false,"context_lines":[{"line_number":35,"context_line":"                \"defined in config\"))"},{"line_number":36,"context_line":"        else:"},{"line_number":37,"context_line":"            return upgradecheck.Result("},{"line_number":38,"context_line":"                upgradecheck.Code.FAILURE, _(\"The default number of workers \""},{"line_number":39,"context_line":"                \"has changed. Please see release notes for the new values, \""},{"line_number":40,"context_line":"                \"but it is strongly encouraged for deployers to manually set \""},{"line_number":41,"context_line":"                \"the values for api_workers and rpc_workers.\"))"}],"source_content_type":"text/x-python","patch_set":10,"id":"9fdfeff1_0e34c7fa","line":38,"range":{"start_line":38,"start_character":34,"end_line":38,"end_character":41},"updated":"2019-02-19 20:08:27.000000000","message":"very sorry that I somehow didn\u0027t noticed that earlier but I think that WARNING would be more accurate here as this change isn\u0027t something which should stop upgrade.","commit_id":"dda25c3ee9f75024b2eeacd890b2d4103b8930cd"},{"author":{"_account_id":10980,"name":"Doug Wiegley","email":"dougwig@parkside.io","username":"dougw"},"change_message_id":"87059e3c2a8cedad684b780f10879b5cf442debe","unresolved":false,"context_lines":[{"line_number":35,"context_line":"                \"defined in config\"))"},{"line_number":36,"context_line":"        else:"},{"line_number":37,"context_line":"            return upgradecheck.Result("},{"line_number":38,"context_line":"                upgradecheck.Code.FAILURE, _(\"The default number of workers \""},{"line_number":39,"context_line":"                \"has changed. Please see release notes for the new values, \""},{"line_number":40,"context_line":"                \"but it is strongly encouraged for deployers to manually set \""},{"line_number":41,"context_line":"                \"the values for api_workers and rpc_workers.\"))"}],"source_content_type":"text/x-python","patch_set":10,"id":"9fdfeff1_91a9b8de","line":38,"range":{"start_line":38,"start_character":34,"end_line":38,"end_character":41},"in_reply_to":"9fdfeff1_0e34c7fa","updated":"2019-02-19 20:24:53.000000000","message":"Done","commit_id":"dda25c3ee9f75024b2eeacd890b2d4103b8930cd"}],"neutron/conf/service.py":[{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"6447c7b67e423aaff756212bbac231560e26b110","unresolved":false,"context_lines":[{"line_number":32,"context_line":"               help\u003d_(\u0027Number of RPC worker processes for service. \u0027"},{"line_number":33,"context_line":"                      \u0027If not specified, the default is equal to half the \u0027"},{"line_number":34,"context_line":"                      \u0027number of CPUs available, capped by potential \u0027"},{"line_number":35,"context_line":"                      \u0027RAM usage.\u0027)),"},{"line_number":36,"context_line":"    cfg.IntOpt(\u0027rpc_state_report_workers\u0027,"},{"line_number":37,"context_line":"               default\u003d1,"},{"line_number":38,"context_line":"               help\u003d_(\u0027Number of RPC worker processes dedicated to state \u0027"}],"source_content_type":"text/x-python","patch_set":1,"id":"9fdfeff1_97ea9ad5","line":35,"updated":"2019-02-12 16:33:34.000000000","message":"It\u0027s actually half the number of api_workers in the code.","commit_id":"3cd27af5dc824b981c9e48a459b0fc5d18debe4c"},{"author":{"_account_id":10980,"name":"Doug Wiegley","email":"dougwig@parkside.io","username":"dougw"},"change_message_id":"ecc46e4b96f56179b052dc39917bbc8237dc96f9","unresolved":false,"context_lines":[{"line_number":32,"context_line":"               help\u003d_(\u0027Number of RPC worker processes for service. \u0027"},{"line_number":33,"context_line":"                      \u0027If not specified, the default is equal to half the \u0027"},{"line_number":34,"context_line":"                      \u0027number of CPUs available, capped by potential \u0027"},{"line_number":35,"context_line":"                      \u0027RAM usage.\u0027)),"},{"line_number":36,"context_line":"    cfg.IntOpt(\u0027rpc_state_report_workers\u0027,"},{"line_number":37,"context_line":"               default\u003d1,"},{"line_number":38,"context_line":"               help\u003d_(\u0027Number of RPC worker processes dedicated to state \u0027"}],"source_content_type":"text/x-python","patch_set":1,"id":"9fdfeff1_fae66bb0","line":35,"in_reply_to":"9fdfeff1_97ea9ad5","updated":"2019-02-12 17:31:15.000000000","message":"Done","commit_id":"3cd27af5dc824b981c9e48a459b0fc5d18debe4c"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"efc9309845805ef4ba91eabed8315cf386682018","unresolved":false,"context_lines":[{"line_number":31,"context_line":"    cfg.IntOpt(\u0027rpc_workers\u0027,"},{"line_number":32,"context_line":"               help\u003d_(\u0027Number of RPC worker processes for service. \u0027"},{"line_number":33,"context_line":"                      \u0027If not specified, the default is equal to half the \u0027"},{"line_number":34,"context_line":"                      \u0027number of API workers.\u0027)),"},{"line_number":35,"context_line":"    cfg.IntOpt(\u0027rpc_state_report_workers\u0027,"},{"line_number":36,"context_line":"               default\u003d1,"},{"line_number":37,"context_line":"               help\u003d_(\u0027Number of RPC worker processes dedicated to state \u0027"}],"source_content_type":"text/x-python","patch_set":11,"id":"9fdfeff1_2cee618b","line":34,"updated":"2019-02-20 16:26:01.000000000","message":"Hopefully it\u0027s obvious that half of one is still one :)","commit_id":"7e09b25b964dde82caf5f5159d25810b6f8ebd3c"},{"author":{"_account_id":10980,"name":"Doug Wiegley","email":"dougwig@parkside.io","username":"dougw"},"change_message_id":"a4b9b7f4b739d6c5092f5603fdf4402a1f827cca","unresolved":false,"context_lines":[{"line_number":31,"context_line":"    cfg.IntOpt(\u0027rpc_workers\u0027,"},{"line_number":32,"context_line":"               help\u003d_(\u0027Number of RPC worker processes for service. \u0027"},{"line_number":33,"context_line":"                      \u0027If not specified, the default is equal to half the \u0027"},{"line_number":34,"context_line":"                      \u0027number of API workers.\u0027)),"},{"line_number":35,"context_line":"    cfg.IntOpt(\u0027rpc_state_report_workers\u0027,"},{"line_number":36,"context_line":"               default\u003d1,"},{"line_number":37,"context_line":"               help\u003d_(\u0027Number of RPC worker processes dedicated to state \u0027"}],"source_content_type":"text/x-python","patch_set":11,"id":"9fdfeff1_7cd5f2e4","line":34,"in_reply_to":"9fdfeff1_2cee618b","updated":"2019-02-20 20:14:36.000000000","message":"Ooh, good point on the floor. I\u0027ll tweak if there\u0027s a re-spin.","commit_id":"7e09b25b964dde82caf5f5159d25810b6f8ebd3c"}],"neutron/service.py":[{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"6447c7b67e423aaff756212bbac231560e26b110","unresolved":false,"context_lines":[{"line_number":174,"context_line":"    workers \u003d cfg.CONF.api_workers"},{"line_number":175,"context_line":"    if workers is None:"},{"line_number":176,"context_line":"        # By default, half as many rpc workers as api workers"},{"line_number":177,"context_line":"        workers \u003d _get_worker_count() / 2"},{"line_number":178,"context_line":""},{"line_number":179,"context_line":"    if cfg.CONF.rpc_workers \u003c 1:"},{"line_number":180,"context_line":"        cfg.CONF.set_override(\u0027rpc_workers\u0027, 1)"}],"source_content_type":"text/x-python","patch_set":1,"id":"9fdfeff1_37d40e20","line":177,"updated":"2019-02-12 16:33:34.000000000","message":"This is never used after here.","commit_id":"3cd27af5dc824b981c9e48a459b0fc5d18debe4c"},{"author":{"_account_id":10980,"name":"Doug Wiegley","email":"dougwig@parkside.io","username":"dougw"},"change_message_id":"ecc46e4b96f56179b052dc39917bbc8237dc96f9","unresolved":false,"context_lines":[{"line_number":174,"context_line":"    workers \u003d cfg.CONF.api_workers"},{"line_number":175,"context_line":"    if workers is None:"},{"line_number":176,"context_line":"        # By default, half as many rpc workers as api workers"},{"line_number":177,"context_line":"        workers \u003d _get_worker_count() / 2"},{"line_number":178,"context_line":""},{"line_number":179,"context_line":"    if cfg.CONF.rpc_workers \u003c 1:"},{"line_number":180,"context_line":"        cfg.CONF.set_override(\u0027rpc_workers\u0027, 1)"}],"source_content_type":"text/x-python","patch_set":1,"id":"9fdfeff1_ba04634b","line":177,"in_reply_to":"9fdfeff1_37d40e20","updated":"2019-02-12 17:31:15.000000000","message":"Done","commit_id":"3cd27af5dc824b981c9e48a459b0fc5d18debe4c"},{"author":{"_account_id":8313,"name":"Lajos Katona","display_name":"lajoskatona","email":"katonalala@gmail.com","username":"elajkat","status":"Ericsson Software Technology"},"change_message_id":"b54b5f48461baba865efbf7cae52cbe726affcd3","unresolved":false,"context_lines":[{"line_number":33,"context_line":"from oslo_service import service as common_service"},{"line_number":34,"context_line":"from oslo_utils import excutils"},{"line_number":35,"context_line":"from oslo_utils import importutils"},{"line_number":36,"context_line":"import psutil"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"from neutron.common import config"},{"line_number":39,"context_line":"from neutron.common import profiler"}],"source_content_type":"text/x-python","patch_set":4,"id":"9fdfeff1_81624a3d","line":36,"range":{"start_line":36,"start_character":0,"end_line":36,"end_character":13},"updated":"2019-02-13 09:19:52.000000000","message":"Please move this import to the first (3rd party) section.","commit_id":"f106940628fbbabe89c3c4d5467ebeb41eee3420"},{"author":{"_account_id":10980,"name":"Doug Wiegley","email":"dougwig@parkside.io","username":"dougw"},"change_message_id":"9607d76b1d29ee46c6010c1d6f7ccf4e5015d645","unresolved":false,"context_lines":[{"line_number":33,"context_line":"from oslo_service import service as common_service"},{"line_number":34,"context_line":"from oslo_utils import excutils"},{"line_number":35,"context_line":"from oslo_utils import importutils"},{"line_number":36,"context_line":"import psutil"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"from neutron.common import config"},{"line_number":39,"context_line":"from neutron.common import profiler"}],"source_content_type":"text/x-python","patch_set":4,"id":"9fdfeff1_dd97ca8f","line":36,"range":{"start_line":36,"start_character":0,"end_line":36,"end_character":13},"in_reply_to":"9fdfeff1_81624a3d","updated":"2019-02-13 15:17:09.000000000","message":"hacking wanted it here, as it\u0027s a third-party library.","commit_id":"f106940628fbbabe89c3c4d5467ebeb41eee3420"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"e5b6c5cfd4127d8bbc52e65cc002441e1957bcd8","unresolved":false,"context_lines":[{"line_number":33,"context_line":"from oslo_service import service as common_service"},{"line_number":34,"context_line":"from oslo_utils import excutils"},{"line_number":35,"context_line":"from oslo_utils import importutils"},{"line_number":36,"context_line":"import psutil"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"from neutron.common import config"},{"line_number":39,"context_line":"from neutron.common import profiler"}],"source_content_type":"text/x-python","patch_set":4,"id":"9fdfeff1_0f52d313","line":36,"range":{"start_line":36,"start_character":0,"end_line":36,"end_character":13},"in_reply_to":"9fdfeff1_dd97ca8f","updated":"2019-02-15 02:49:13.000000000","message":"Yes, this is its correct place:https://psutil.readthedocs.io/en/latest/","commit_id":"f106940628fbbabe89c3c4d5467ebeb41eee3420"},{"author":{"_account_id":8313,"name":"Lajos Katona","display_name":"lajoskatona","email":"katonalala@gmail.com","username":"elajkat","status":"Ericsson Software Technology"},"change_message_id":"b54b5f48461baba865efbf7cae52cbe726affcd3","unresolved":false,"context_lines":[{"line_number":153,"context_line":"    # Start with the number of CPUs"},{"line_number":154,"context_line":"    n \u003d processutils.get_worker_count()"},{"line_number":155,"context_line":""},{"line_number":156,"context_line":"    # Now don\u0027t use more than half the system memory, assuming"},{"line_number":157,"context_line":"    # a steady-state bloat of around 2GB."},{"line_number":158,"context_line":"    mem \u003d psutil.virtual_memory()"},{"line_number":159,"context_line":"    m \u003d mem.total / (2 * 1024 * 1024 * 1024)"},{"line_number":160,"context_line":"    if m \u003c n:"},{"line_number":161,"context_line":"        n \u003d m"},{"line_number":162,"context_line":""},{"line_number":163,"context_line":"    # And just in case, always at least one."},{"line_number":164,"context_line":"    if n \u003c\u003d 0:"}],"source_content_type":"text/x-python","patch_set":4,"id":"9fdfeff1_e44d643b","line":161,"range":{"start_line":156,"start_character":4,"end_line":161,"end_character":13},"updated":"2019-02-13 09:19:52.000000000","message":"This whole problem for me is an admin task or a deployment tool question, but let\u0027s see how others think about it.","commit_id":"f106940628fbbabe89c3c4d5467ebeb41eee3420"},{"author":{"_account_id":10980,"name":"Doug Wiegley","email":"dougwig@parkside.io","username":"dougw"},"change_message_id":"b99b581ad154f81c302bd3ceb99a32823061d392","unresolved":false,"context_lines":[{"line_number":153,"context_line":"    # Start with the number of CPUs"},{"line_number":154,"context_line":"    n \u003d processutils.get_worker_count()"},{"line_number":155,"context_line":""},{"line_number":156,"context_line":"    # Now don\u0027t use more than half the system memory, assuming"},{"line_number":157,"context_line":"    # a steady-state bloat of around 2GB."},{"line_number":158,"context_line":"    mem \u003d psutil.virtual_memory()"},{"line_number":159,"context_line":"    m \u003d mem.total / (2 * 1024 * 1024 * 1024)"},{"line_number":160,"context_line":"    if m \u003c n:"},{"line_number":161,"context_line":"        n \u003d m"},{"line_number":162,"context_line":""},{"line_number":163,"context_line":"    # And just in case, always at least one."},{"line_number":164,"context_line":"    if n \u003c\u003d 0:"}],"source_content_type":"text/x-python","patch_set":4,"id":"9fdfeff1_d100fc36","line":161,"range":{"start_line":156,"start_character":4,"end_line":161,"end_character":13},"in_reply_to":"9fdfeff1_8036a950","updated":"2019-02-14 15:40:22.000000000","message":"I appreciate the feedback, but we may be at somewhat of an impasse. I\u0027m not sure that I see how looking at memory is any different than looking at cores. Either both are bad or not. But there are some other factors here:\n\n- I agree that operators should have full control, and that\u0027s why the config file values are used, no matter what, if defined.\n\n- All of the other OpenStack services run \"just fine\" up to quite reasonable loads without this kind of tweaking. Requiring yet another knob for operators adds yet more friction that is unique to Neutron. And we have enough friction already, believe me.\n\n- The reason we even base things on cores in the first place is due to performance issues. But, that algorithm has a bug, in that high core/low memory boxes will suffer random server kills!  So we\u0027ve got this backwards compatibility issue where if we hard cap it, an operator may find they have fewer processes than needed on upgrade (never a welcome surprise), or it might still be too high and not fix the OOM problems.\n\nSo, I\u0027m trying to stay as faithful to what\u0027s out in the field today as possible, while avoiding the random process killings. And also address what looks to be an oversight with rpc_workers (which I\u0027ve had get behind at *three* productions sites now, where folks weren\u0027t aware it needed tweaking.)\n\nI\u0027d love to hear other thoughts on this as well.  I\u0027ve personally seen both devstack\u0027s that use too many processes and kill themselves, and production boxes with OOM issues at a scale where it shouldn\u0027t yet be a problem. I\u0027ve also seen too many processes increase db contention issues, so it\u0027s a tricky balance today (too tricky; that\u0027s a bug, IMO, but a much bigger one to address.)","commit_id":"f106940628fbbabe89c3c4d5467ebeb41eee3420"},{"author":{"_account_id":10980,"name":"Doug Wiegley","email":"dougwig@parkside.io","username":"dougw"},"change_message_id":"32502d5dde9868a452297a74574e5da5a54e4895","unresolved":false,"context_lines":[{"line_number":153,"context_line":"    # Start with the number of CPUs"},{"line_number":154,"context_line":"    n \u003d processutils.get_worker_count()"},{"line_number":155,"context_line":""},{"line_number":156,"context_line":"    # Now don\u0027t use more than half the system memory, assuming"},{"line_number":157,"context_line":"    # a steady-state bloat of around 2GB."},{"line_number":158,"context_line":"    mem \u003d psutil.virtual_memory()"},{"line_number":159,"context_line":"    m \u003d mem.total / (2 * 1024 * 1024 * 1024)"},{"line_number":160,"context_line":"    if m \u003c n:"},{"line_number":161,"context_line":"        n \u003d m"},{"line_number":162,"context_line":""},{"line_number":163,"context_line":"    # And just in case, always at least one."},{"line_number":164,"context_line":"    if n \u003c\u003d 0:"}],"source_content_type":"text/x-python","patch_set":4,"id":"9fdfeff1_ef074f81","line":161,"range":{"start_line":156,"start_character":4,"end_line":161,"end_character":13},"in_reply_to":"9fdfeff1_af5707ca","updated":"2019-02-15 03:20:03.000000000","message":"Yes to both. Is the installation guide in our tree, or do we file a doc bug still?","commit_id":"f106940628fbbabe89c3c4d5467ebeb41eee3420"},{"author":{"_account_id":8313,"name":"Lajos Katona","display_name":"lajoskatona","email":"katonalala@gmail.com","username":"elajkat","status":"Ericsson Software Technology"},"change_message_id":"092769579b77ded918bebaf9205e1889094269c8","unresolved":false,"context_lines":[{"line_number":153,"context_line":"    # Start with the number of CPUs"},{"line_number":154,"context_line":"    n \u003d processutils.get_worker_count()"},{"line_number":155,"context_line":""},{"line_number":156,"context_line":"    # Now don\u0027t use more than half the system memory, assuming"},{"line_number":157,"context_line":"    # a steady-state bloat of around 2GB."},{"line_number":158,"context_line":"    mem \u003d psutil.virtual_memory()"},{"line_number":159,"context_line":"    m \u003d mem.total / (2 * 1024 * 1024 * 1024)"},{"line_number":160,"context_line":"    if m \u003c n:"},{"line_number":161,"context_line":"        n \u003d m"},{"line_number":162,"context_line":""},{"line_number":163,"context_line":"    # And just in case, always at least one."},{"line_number":164,"context_line":"    if n \u003c\u003d 0:"}],"source_content_type":"text/x-python","patch_set":4,"id":"9fdfeff1_8036a950","line":161,"range":{"start_line":156,"start_character":4,"end_line":161,"end_character":13},"in_reply_to":"9fdfeff1_bd8a0661","updated":"2019-02-14 09:41:31.000000000","message":"I agree, but I think neutron is not on the level to know about available memory on the host. So for the default I should use something like (number of available CPUs but max. 8) or similar, and give the hint (in doc for example) for the deployer to set the number of workers based on knowledge like available memory","commit_id":"f106940628fbbabe89c3c4d5467ebeb41eee3420"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"e5b6c5cfd4127d8bbc52e65cc002441e1957bcd8","unresolved":false,"context_lines":[{"line_number":153,"context_line":"    # Start with the number of CPUs"},{"line_number":154,"context_line":"    n \u003d processutils.get_worker_count()"},{"line_number":155,"context_line":""},{"line_number":156,"context_line":"    # Now don\u0027t use more than half the system memory, assuming"},{"line_number":157,"context_line":"    # a steady-state bloat of around 2GB."},{"line_number":158,"context_line":"    mem \u003d psutil.virtual_memory()"},{"line_number":159,"context_line":"    m \u003d mem.total / (2 * 1024 * 1024 * 1024)"},{"line_number":160,"context_line":"    if m \u003c n:"},{"line_number":161,"context_line":"        n \u003d m"},{"line_number":162,"context_line":""},{"line_number":163,"context_line":"    # And just in case, always at least one."},{"line_number":164,"context_line":"    if n \u003c\u003d 0:"}],"source_content_type":"text/x-python","patch_set":4,"id":"9fdfeff1_af5707ca","line":161,"range":{"start_line":156,"start_character":4,"end_line":161,"end_character":13},"in_reply_to":"9fdfeff1_d100fc36","updated":"2019-02-15 02:49:13.000000000","message":"I am ok with this approach. Looking into memory is not much different than looking into cores. Should we add something to the installation guide to document this assumption: https://docs.openstack.org/neutron/latest/install/index.html. Should we also add a release note?","commit_id":"f106940628fbbabe89c3c4d5467ebeb41eee3420"},{"author":{"_account_id":10980,"name":"Doug Wiegley","email":"dougwig@parkside.io","username":"dougw"},"change_message_id":"9607d76b1d29ee46c6010c1d6f7ccf4e5015d645","unresolved":false,"context_lines":[{"line_number":153,"context_line":"    # Start with the number of CPUs"},{"line_number":154,"context_line":"    n \u003d processutils.get_worker_count()"},{"line_number":155,"context_line":""},{"line_number":156,"context_line":"    # Now don\u0027t use more than half the system memory, assuming"},{"line_number":157,"context_line":"    # a steady-state bloat of around 2GB."},{"line_number":158,"context_line":"    mem \u003d psutil.virtual_memory()"},{"line_number":159,"context_line":"    m \u003d mem.total / (2 * 1024 * 1024 * 1024)"},{"line_number":160,"context_line":"    if m \u003c n:"},{"line_number":161,"context_line":"        n \u003d m"},{"line_number":162,"context_line":""},{"line_number":163,"context_line":"    # And just in case, always at least one."},{"line_number":164,"context_line":"    if n \u003c\u003d 0:"}],"source_content_type":"text/x-python","patch_set":4,"id":"9fdfeff1_bd8a0661","line":161,"range":{"start_line":156,"start_character":4,"end_line":161,"end_character":13},"in_reply_to":"9fdfeff1_e44d643b","updated":"2019-02-13 15:17:09.000000000","message":"It should still have a reasonable default, IMO.","commit_id":"f106940628fbbabe89c3c4d5467ebeb41eee3420"},{"author":{"_account_id":8313,"name":"Lajos Katona","display_name":"lajoskatona","email":"katonalala@gmail.com","username":"elajkat","status":"Ericsson Software Technology"},"change_message_id":"79f1d15b3f0d48d1547f91874d4411f600924a9c","unresolved":false,"context_lines":[{"line_number":153,"context_line":"    # Start with the number of CPUs"},{"line_number":154,"context_line":"    n \u003d processutils.get_worker_count()"},{"line_number":155,"context_line":""},{"line_number":156,"context_line":"    # Now don\u0027t use more than half the system memory, assuming"},{"line_number":157,"context_line":"    # a steady-state bloat of around 2GB."},{"line_number":158,"context_line":"    mem \u003d psutil.virtual_memory()"},{"line_number":159,"context_line":"    m \u003d mem.total / (2 * 1024 * 1024 * 1024)"},{"line_number":160,"context_line":"    if m \u003c n:"},{"line_number":161,"context_line":"        n \u003d m"},{"line_number":162,"context_line":""},{"line_number":163,"context_line":"    # And just in case, always at least one."},{"line_number":164,"context_line":"    if n \u003c\u003d 0:"}],"source_content_type":"text/x-python","patch_set":4,"id":"9fdfeff1_3d526d36","line":161,"range":{"start_line":156,"start_character":4,"end_line":161,"end_character":13},"in_reply_to":"9fdfeff1_ef074f81","updated":"2019-02-15 07:24:52.000000000","message":"No more objections from my side :-)","commit_id":"f106940628fbbabe89c3c4d5467ebeb41eee3420"},{"author":{"_account_id":8313,"name":"Lajos Katona","display_name":"lajoskatona","email":"katonalala@gmail.com","username":"elajkat","status":"Ericsson Software Technology"},"change_message_id":"b54b5f48461baba865efbf7cae52cbe726affcd3","unresolved":false,"context_lines":[{"line_number":161,"context_line":"        n \u003d m"},{"line_number":162,"context_line":""},{"line_number":163,"context_line":"    # And just in case, always at least one."},{"line_number":164,"context_line":"    if n \u003c\u003d 0:"},{"line_number":165,"context_line":"        n \u003d 1"},{"line_number":166,"context_line":""},{"line_number":167,"context_line":"    return n"},{"line_number":168,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"9fdfeff1_a1c3ceec","line":165,"range":{"start_line":164,"start_character":4,"end_line":165,"end_character":13},"updated":"2019-02-13 09:19:52.000000000","message":"get_worker_count returns 1 in worst case (https://github.com/openstack/oslo.concurrency/blob/master/oslo_concurrency/processutils.py#L590) so this check is useless as I see","commit_id":"f106940628fbbabe89c3c4d5467ebeb41eee3420"},{"author":{"_account_id":10980,"name":"Doug Wiegley","email":"dougwig@parkside.io","username":"dougw"},"change_message_id":"9607d76b1d29ee46c6010c1d6f7ccf4e5015d645","unresolved":false,"context_lines":[{"line_number":161,"context_line":"        n \u003d m"},{"line_number":162,"context_line":""},{"line_number":163,"context_line":"    # And just in case, always at least one."},{"line_number":164,"context_line":"    if n \u003c\u003d 0:"},{"line_number":165,"context_line":"        n \u003d 1"},{"line_number":166,"context_line":""},{"line_number":167,"context_line":"    return n"},{"line_number":168,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"9fdfeff1_dddcaa75","line":165,"range":{"start_line":164,"start_character":4,"end_line":165,"end_character":13},"in_reply_to":"9fdfeff1_a1c3ceec","updated":"2019-02-13 15:17:09.000000000","message":"The math above, with integer truncation, could\u0027ve resulted in 0.","commit_id":"f106940628fbbabe89c3c4d5467ebeb41eee3420"},{"author":{"_account_id":13995,"name":"Nate Johnston","email":"nate.johnston@redhat.com","username":"natejohnston"},"change_message_id":"820cb98181a075cea9a3c7e70e577dafe83a287a","unresolved":false,"context_lines":[{"line_number":151,"context_line":""},{"line_number":152,"context_line":"def _get_worker_count():"},{"line_number":153,"context_line":"    # Start with the number of CPUs"},{"line_number":154,"context_line":"    n \u003d processutils.get_worker_count()"},{"line_number":155,"context_line":""},{"line_number":156,"context_line":"    # Now don\u0027t use more than half the system memory, assuming"},{"line_number":157,"context_line":"    # a steady-state bloat of around 2GB."}],"source_content_type":"text/x-python","patch_set":6,"id":"9fdfeff1_278b2ec0","line":154,"updated":"2019-02-15 20:23:41.000000000","message":"I think the use of single character variable names makes code harder to read.  Is there any reason not to use a variable name like \"num_workers\" here?  And for \"m\" below you could call it \"memory_factor\" or \"memory_capacity\".","commit_id":"9327c5c78f3835696b6681f0ce084a2df5e1c7a4"},{"author":{"_account_id":10980,"name":"Doug Wiegley","email":"dougwig@parkside.io","username":"dougw"},"change_message_id":"37cf7ecd5be926d4c8400db93967d8e764e9e238","unresolved":false,"context_lines":[{"line_number":151,"context_line":""},{"line_number":152,"context_line":"def _get_worker_count():"},{"line_number":153,"context_line":"    # Start with the number of CPUs"},{"line_number":154,"context_line":"    n \u003d processutils.get_worker_count()"},{"line_number":155,"context_line":""},{"line_number":156,"context_line":"    # Now don\u0027t use more than half the system memory, assuming"},{"line_number":157,"context_line":"    # a steady-state bloat of around 2GB."}],"source_content_type":"text/x-python","patch_set":6,"id":"9fdfeff1_9f649a23","line":154,"in_reply_to":"9fdfeff1_278b2ec0","updated":"2019-02-16 02:11:30.000000000","message":"Done","commit_id":"9327c5c78f3835696b6681f0ce084a2df5e1c7a4"},{"author":{"_account_id":10980,"name":"Doug Wiegley","email":"dougwig@parkside.io","username":"dougw"},"change_message_id":"10fe8a1df96a15764f4e7fe8fdd6342aee024503","unresolved":false,"context_lines":[{"line_number":151,"context_line":""},{"line_number":152,"context_line":"def _get_worker_count():"},{"line_number":153,"context_line":"    # Start with the number of CPUs"},{"line_number":154,"context_line":"    n \u003d processutils.get_worker_count()"},{"line_number":155,"context_line":""},{"line_number":156,"context_line":"    # Now don\u0027t use more than half the system memory, assuming"},{"line_number":157,"context_line":"    # a steady-state bloat of around 2GB."}],"source_content_type":"text/x-python","patch_set":6,"id":"9fdfeff1_3c857cad","line":154,"in_reply_to":"9fdfeff1_278b2ec0","updated":"2019-02-16 00:17:35.000000000","message":"My C roots showing. I\u0027ll make \u0027em longer.","commit_id":"9327c5c78f3835696b6681f0ce084a2df5e1c7a4"},{"author":{"_account_id":13995,"name":"Nate Johnston","email":"nate.johnston@redhat.com","username":"natejohnston"},"change_message_id":"820cb98181a075cea9a3c7e70e577dafe83a287a","unresolved":false,"context_lines":[{"line_number":175,"context_line":"    workers \u003d cfg.CONF.rpc_workers"},{"line_number":176,"context_line":"    if workers is None:"},{"line_number":177,"context_line":"        # By default, half as many rpc workers as api workers"},{"line_number":178,"context_line":"        workers \u003d _get_worker_count() / 2"},{"line_number":179,"context_line":"    elif workers \u003c 1:"},{"line_number":180,"context_line":"        workers \u003d 1"},{"line_number":181,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"9fdfeff1_c7bfc25e","line":178,"updated":"2019-02-15 20:23:41.000000000","message":"Thank you for prompting me to refamiliarize myself with PEP-238 :-)","commit_id":"9327c5c78f3835696b6681f0ce084a2df5e1c7a4"},{"author":{"_account_id":10980,"name":"Doug Wiegley","email":"dougwig@parkside.io","username":"dougw"},"change_message_id":"37cf7ecd5be926d4c8400db93967d8e764e9e238","unresolved":false,"context_lines":[{"line_number":175,"context_line":"    workers \u003d cfg.CONF.rpc_workers"},{"line_number":176,"context_line":"    if workers is None:"},{"line_number":177,"context_line":"        # By default, half as many rpc workers as api workers"},{"line_number":178,"context_line":"        workers \u003d _get_worker_count() / 2"},{"line_number":179,"context_line":"    elif workers \u003c 1:"},{"line_number":180,"context_line":"        workers \u003d 1"},{"line_number":181,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"9fdfeff1_bf671e25","line":178,"in_reply_to":"9fdfeff1_c7bfc25e","updated":"2019-02-16 02:11:30.000000000","message":"Done","commit_id":"9327c5c78f3835696b6681f0ce084a2df5e1c7a4"},{"author":{"_account_id":10980,"name":"Doug Wiegley","email":"dougwig@parkside.io","username":"dougw"},"change_message_id":"10fe8a1df96a15764f4e7fe8fdd6342aee024503","unresolved":false,"context_lines":[{"line_number":175,"context_line":"    workers \u003d cfg.CONF.rpc_workers"},{"line_number":176,"context_line":"    if workers is None:"},{"line_number":177,"context_line":"        # By default, half as many rpc workers as api workers"},{"line_number":178,"context_line":"        workers \u003d _get_worker_count() / 2"},{"line_number":179,"context_line":"    elif workers \u003c 1:"},{"line_number":180,"context_line":"        workers \u003d 1"},{"line_number":181,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"9fdfeff1_bc996c1f","line":178,"in_reply_to":"9fdfeff1_c7bfc25e","updated":"2019-02-16 00:17:35.000000000","message":"Ooh, that is a bug, since it could end up a 1/2 \u003d\u003d 0.","commit_id":"9327c5c78f3835696b6681f0ce084a2df5e1c7a4"},{"author":{"_account_id":13995,"name":"Nate Johnston","email":"nate.johnston@redhat.com","username":"natejohnston"},"change_message_id":"820cb98181a075cea9a3c7e70e577dafe83a287a","unresolved":false,"context_lines":[{"line_number":185,"context_line":"    # multiple RPC workers."},{"line_number":186,"context_line":"    if not plugin.rpc_workers_supported():"},{"line_number":187,"context_line":"        LOG.debug(\"Active plugin doesn\u0027t implement start_rpc_listeners\")"},{"line_number":188,"context_line":"        if 0 \u003c workers:"},{"line_number":189,"context_line":"            LOG.error(\"\u0027rpc_workers \u003d %d\u0027 ignored because \""},{"line_number":190,"context_line":"                      \"start_rpc_listeners is not implemented.\","},{"line_number":191,"context_line":"                      workers)"}],"source_content_type":"text/x-python","patch_set":6,"id":"9fdfeff1_e7c206e9","line":188,"updated":"2019-02-15 20:23:41.000000000","message":"Is it any violation of style to say \"if workers \u003e 0\"?  Because that is far less confusing to read.  My inner monologue tripped all over \"if zero is less than the number of workers...\"","commit_id":"9327c5c78f3835696b6681f0ce084a2df5e1c7a4"},{"author":{"_account_id":10980,"name":"Doug Wiegley","email":"dougwig@parkside.io","username":"dougw"},"change_message_id":"37cf7ecd5be926d4c8400db93967d8e764e9e238","unresolved":false,"context_lines":[{"line_number":185,"context_line":"    # multiple RPC workers."},{"line_number":186,"context_line":"    if not plugin.rpc_workers_supported():"},{"line_number":187,"context_line":"        LOG.debug(\"Active plugin doesn\u0027t implement start_rpc_listeners\")"},{"line_number":188,"context_line":"        if 0 \u003c workers:"},{"line_number":189,"context_line":"            LOG.error(\"\u0027rpc_workers \u003d %d\u0027 ignored because \""},{"line_number":190,"context_line":"                      \"start_rpc_listeners is not implemented.\","},{"line_number":191,"context_line":"                      workers)"}],"source_content_type":"text/x-python","patch_set":6,"id":"9fdfeff1_5f6ab2ec","line":188,"in_reply_to":"9fdfeff1_7c9f8401","updated":"2019-02-16 02:11:30.000000000","message":"Done","commit_id":"9327c5c78f3835696b6681f0ce084a2df5e1c7a4"},{"author":{"_account_id":10980,"name":"Doug Wiegley","email":"dougwig@parkside.io","username":"dougw"},"change_message_id":"10fe8a1df96a15764f4e7fe8fdd6342aee024503","unresolved":false,"context_lines":[{"line_number":185,"context_line":"    # multiple RPC workers."},{"line_number":186,"context_line":"    if not plugin.rpc_workers_supported():"},{"line_number":187,"context_line":"        LOG.debug(\"Active plugin doesn\u0027t implement start_rpc_listeners\")"},{"line_number":188,"context_line":"        if 0 \u003c workers:"},{"line_number":189,"context_line":"            LOG.error(\"\u0027rpc_workers \u003d %d\u0027 ignored because \""},{"line_number":190,"context_line":"                      \"start_rpc_listeners is not implemented.\","},{"line_number":191,"context_line":"                      workers)"}],"source_content_type":"text/x-python","patch_set":6,"id":"9fdfeff1_7c9f8401","line":188,"in_reply_to":"9fdfeff1_e7c206e9","updated":"2019-02-16 00:17:35.000000000","message":"I was just conforming to the style that was there, which I also find unintuitive. I\u0027ll swap it.","commit_id":"9327c5c78f3835696b6681f0ce084a2df5e1c7a4"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"60d9395d50f2aff42db71fb4209fdb1a4fa11637","unresolved":false,"context_lines":[{"line_number":154,"context_line":"    num_workers \u003d processutils.get_worker_count()"},{"line_number":155,"context_line":""},{"line_number":156,"context_line":"    # Now don\u0027t use more than half the system memory, assuming"},{"line_number":157,"context_line":"    # a steady-state bloat of around 2GB."},{"line_number":158,"context_line":"    mem \u003d psutil.virtual_memory()"},{"line_number":159,"context_line":"    mem_workers \u003d int(mem.total / (2 * 1024 * 1024 * 1024))"},{"line_number":160,"context_line":"    if mem_workers \u003c num_workers:"}],"source_content_type":"text/x-python","patch_set":7,"id":"9fdfeff1_68cc99ba","line":157,"range":{"start_line":157,"start_character":37,"end_line":157,"end_character":40},"updated":"2019-02-17 12:29:49.000000000","message":"What if one day the memory is reduced to lower than 2G? Is there any memory usage difference between py2 and py3?","commit_id":"4967f5a3b5b56f60fb1846f7786369bb2de48ce6"},{"author":{"_account_id":10980,"name":"Doug Wiegley","email":"dougwig@parkside.io","username":"dougw"},"change_message_id":"81c5e169140e9aeb7aff8bfc139d56289d570815","unresolved":false,"context_lines":[{"line_number":154,"context_line":"    num_workers \u003d processutils.get_worker_count()"},{"line_number":155,"context_line":""},{"line_number":156,"context_line":"    # Now don\u0027t use more than half the system memory, assuming"},{"line_number":157,"context_line":"    # a steady-state bloat of around 2GB."},{"line_number":158,"context_line":"    mem \u003d psutil.virtual_memory()"},{"line_number":159,"context_line":"    mem_workers \u003d int(mem.total / (2 * 1024 * 1024 * 1024))"},{"line_number":160,"context_line":"    if mem_workers \u003c num_workers:"}],"source_content_type":"text/x-python","patch_set":7,"id":"9fdfeff1_4b818ffa","line":157,"range":{"start_line":157,"start_character":37,"end_line":157,"end_character":40},"in_reply_to":"9fdfeff1_68cc99ba","updated":"2019-02-17 17:40:13.000000000","message":"If it reduces, we can adjust here at that point. Although really, I think we have too many by default right now. Our .no locking plan . of db retries gets . even . worse . with more listeners.  So, I\u0027d really like to . not have one per core . now, but I\u0027m not adjusting that due to backwards compat.","commit_id":"4967f5a3b5b56f60fb1846f7786369bb2de48ce6"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"60d9395d50f2aff42db71fb4209fdb1a4fa11637","unresolved":false,"context_lines":[{"line_number":172,"context_line":"        plugin \u003d directory.get_plugin()"},{"line_number":173,"context_line":"    service_plugins \u003d directory.get_plugins().values()"},{"line_number":174,"context_line":""},{"line_number":175,"context_line":"    workers \u003d cfg.CONF.rpc_workers"},{"line_number":176,"context_line":"    if workers is None:"},{"line_number":177,"context_line":"        # By default, half as many rpc workers as api workers"},{"line_number":178,"context_line":"        workers \u003d int(_get_worker_count() / 2)"},{"line_number":179,"context_line":"    if workers \u003c 1:"},{"line_number":180,"context_line":"        workers \u003d 1"},{"line_number":181,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"9fdfeff1_c8bca507","line":178,"range":{"start_line":175,"start_character":4,"end_line":178,"end_character":46},"updated":"2019-02-17 12:29:49.000000000","message":"Does RPC workers also meet the OOM kill issue? In the memory count procedure (line 159), it will be better to count the RPC worker memory usage, or not? I mean, if we have 16 core, 8G memory, the API worker will be 4, and the RPC worker will be 2. If RPC worker also needs large memory space, will also have OOM?","commit_id":"4967f5a3b5b56f60fb1846f7786369bb2de48ce6"},{"author":{"_account_id":10980,"name":"Doug Wiegley","email":"dougwig@parkside.io","username":"dougw"},"change_message_id":"81c5e169140e9aeb7aff8bfc139d56289d570815","unresolved":false,"context_lines":[{"line_number":172,"context_line":"        plugin \u003d directory.get_plugin()"},{"line_number":173,"context_line":"    service_plugins \u003d directory.get_plugins().values()"},{"line_number":174,"context_line":""},{"line_number":175,"context_line":"    workers \u003d cfg.CONF.rpc_workers"},{"line_number":176,"context_line":"    if workers is None:"},{"line_number":177,"context_line":"        # By default, half as many rpc workers as api workers"},{"line_number":178,"context_line":"        workers \u003d int(_get_worker_count() / 2)"},{"line_number":179,"context_line":"    if workers \u003c 1:"},{"line_number":180,"context_line":"        workers \u003d 1"},{"line_number":181,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"9fdfeff1_6b84930b","line":178,"range":{"start_line":175,"start_character":4,"end_line":178,"end_character":46},"in_reply_to":"9fdfeff1_c8bca507","updated":"2019-02-17 17:40:13.000000000","message":"They\u0027re about the same, and it averages 2GB.  So the above totals are setup to use about 75% of RAM. I could easily be convinced that it should be lower, though.","commit_id":"4967f5a3b5b56f60fb1846f7786369bb2de48ce6"},{"author":{"_account_id":10980,"name":"Doug Wiegley","email":"dougwig@parkside.io","username":"dougw"},"change_message_id":"00a8a34d63595c4acbc1df4895bc80f76606bd9a","unresolved":false,"context_lines":[{"line_number":172,"context_line":"        plugin \u003d directory.get_plugin()"},{"line_number":173,"context_line":"    service_plugins \u003d directory.get_plugins().values()"},{"line_number":174,"context_line":""},{"line_number":175,"context_line":"    workers \u003d cfg.CONF.rpc_workers"},{"line_number":176,"context_line":"    if workers is None:"},{"line_number":177,"context_line":"        # By default, half as many rpc workers as api workers"},{"line_number":178,"context_line":"        workers \u003d int(_get_worker_count() / 2)"},{"line_number":179,"context_line":"    if workers \u003c 1:"},{"line_number":180,"context_line":"        workers \u003d 1"},{"line_number":181,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"9fdfeff1_9f7a4d85","line":178,"range":{"start_line":175,"start_character":4,"end_line":178,"end_character":46},"in_reply_to":"9fdfeff1_c8bca507","updated":"2019-02-18 05:56:20.000000000","message":"Your math is slightly off.  If you have 16 cores and 8GB, you\u0027ll have:\n\n16 api workers, reduced to 4.\n8 rpc workers,r educed to 2.\n\n(4+2) * 2 \u003d 12. So it\u0027s still under.","commit_id":"4967f5a3b5b56f60fb1846f7786369bb2de48ce6"}],"releasenotes/notes/modify_api_rpc_worker_defaults-1acd62728b2b55fa.yaml":[{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"1fafde61e8989741b57146c074397afc44257807","unresolved":false,"context_lines":[{"line_number":2,"context_line":"  - The number of api and rpc workers may change on upgrade."},{"line_number":3,"context_line":"    It is strongly recommended that all deployers set these"},{"line_number":4,"context_line":"    values in their neutron configurations, rather than"},{"line_number":5,"context_line":"    using the defaults."},{"line_number":6,"context_line":"fixes:"},{"line_number":7,"context_line":"  - Neutron API workers default to the number of CPU cores."},{"line_number":8,"context_line":"    This can lead to high cpu/low memory boxes getting into"}],"source_content_type":"text/x-yaml","patch_set":5,"id":"9fdfeff1_587f3f14","line":5,"updated":"2019-02-15 08:00:23.000000000","message":"I wonder if that is worth to add first real upgrade-check.\nWe can check if config options are set or not and if not, warn that defaults are changed now.","commit_id":"91b399e15104827bdf1a08da5380c9f62b0b4e57"},{"author":{"_account_id":10980,"name":"Doug Wiegley","email":"dougwig@parkside.io","username":"dougw"},"change_message_id":"eee1a65a185dd797a3292f1dda36a602499b360b","unresolved":false,"context_lines":[{"line_number":2,"context_line":"  - The number of api and rpc workers may change on upgrade."},{"line_number":3,"context_line":"    It is strongly recommended that all deployers set these"},{"line_number":4,"context_line":"    values in their neutron configurations, rather than"},{"line_number":5,"context_line":"    using the defaults."},{"line_number":6,"context_line":"fixes:"},{"line_number":7,"context_line":"  - Neutron API workers default to the number of CPU cores."},{"line_number":8,"context_line":"    This can lead to high cpu/low memory boxes getting into"}],"source_content_type":"text/x-yaml","patch_set":5,"id":"9fdfeff1_76380aed","line":5,"in_reply_to":"9fdfeff1_587f3f14","updated":"2019-02-15 18:10:40.000000000","message":"Done","commit_id":"91b399e15104827bdf1a08da5380c9f62b0b4e57"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"efc9309845805ef4ba91eabed8315cf386682018","unresolved":false,"context_lines":[{"line_number":1,"context_line":"upgrade:"},{"line_number":2,"context_line":"  - The number of api and rpc workers may change on upgrade."},{"line_number":3,"context_line":"    It is strongly recommended that all deployers set these"},{"line_number":4,"context_line":"    values in their neutron configurations, rather than"},{"line_number":5,"context_line":"    using the defaults."}],"source_content_type":"text/x-yaml","patch_set":11,"id":"9fdfeff1_8c8d0dd5","line":2,"range":{"start_line":2,"start_character":18,"end_line":2,"end_character":21},"updated":"2019-02-20 16:26:01.000000000","message":"s/Neutron API and RPC\n\nto match below paragraph","commit_id":"7e09b25b964dde82caf5f5159d25810b6f8ebd3c"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"efc9309845805ef4ba91eabed8315cf386682018","unresolved":false,"context_lines":[{"line_number":6,"context_line":"fixes:"},{"line_number":7,"context_line":"  - Neutron API workers default to the number of CPU cores."},{"line_number":8,"context_line":"    This can lead to high cpu/low memory boxes getting into"},{"line_number":9,"context_line":"    trouble. The defaults have been tweaked to attempt to"},{"line_number":10,"context_line":"    put an upper bound on the default of either the number"},{"line_number":11,"context_line":"    of cores, or half of system memory, whichever is lower."},{"line_number":12,"context_line":"    In addition, the default number of RPC workers has been"}],"source_content_type":"text/x-yaml","patch_set":11,"id":"9fdfeff1_cc8315a9","line":9,"range":{"start_line":9,"start_character":36,"end_line":9,"end_character":43},"updated":"2019-02-20 16:26:01.000000000","message":"nit: changed","commit_id":"7e09b25b964dde82caf5f5159d25810b6f8ebd3c"}]}
