{"action":"created","issue":{"url":"https://api.github.com/repos/jemalloc/jemalloc/issues/330","repository_url":"https://api.github.com/repos/jemalloc/jemalloc","labels_url":"https://api.github.com/repos/jemalloc/jemalloc/issues/330/labels{/name}","comments_url":"https://api.github.com/repos/jemalloc/jemalloc/issues/330/comments","events_url":"https://api.github.com/repos/jemalloc/jemalloc/issues/330/events","html_url":"https://github.com/jemalloc/jemalloc/pull/330","id":134363374,"number":330,"title":"Separate arena_avail trees","user":{"login":"djwatson","id":1105350,"avatar_url":"https://avatars.githubusercontent.com/u/1105350?v=3","gravatar_id":"","url":"https://api.github.com/users/djwatson","html_url":"https://github.com/djwatson","followers_url":"https://api.github.com/users/djwatson/followers","following_url":"https://api.github.com/users/djwatson/following{/other_user}","gists_url":"https://api.github.com/users/djwatson/gists{/gist_id}","starred_url":"https://api.github.com/users/djwatson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/djwatson/subscriptions","organizations_url":"https://api.github.com/users/djwatson/orgs","repos_url":"https://api.github.com/users/djwatson/repos","events_url":"https://api.github.com/users/djwatson/events{/privacy}","received_events_url":"https://api.github.com/users/djwatson/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2016-02-17T18:39:41Z","updated_at":"2016-02-23T17:50:16Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/jemalloc/jemalloc/pulls/330","html_url":"https://github.com/jemalloc/jemalloc/pull/330","diff_url":"https://github.com/jemalloc/jemalloc/pull/330.diff","patch_url":"https://github.com/jemalloc/jemalloc/pull/330.patch"},"body":"Summary:\r\nSeparate run trees by index, replacing the previous quantize logic.  Quantization by index is now preformed only on insertion / removal from the tree, and not on node comparison, saving some cpu.  This also means we don't have to dereference the miscelm* pointers, saving half of the memory loads from miscelms/mapbits that have fallen out of cache.  A linear scan of the indicies appears to be fast enough.\r\n\r\nThe only cost of this is an extra tree array in each arena.\r\n\r\nIt looks like part of the win here may have been a subtle quantize bug introduced in 8a03cf039c - certain run_quantize_next calls seem to return an index one or two higher than are actually necessary to support the allocation request\r\n\r\nTest Plan:\r\nmake check\r\n\r\nran several canaries of our services.  Shows ~1% cpu improvement, ~1% memory savings, and ~3-4% p99 latency improvement, depending on exact service and metrics\r\n\r\nBlame Rev: 8a03cf039c"},"comment":{"url":"https://api.github.com/repos/jemalloc/jemalloc/issues/comments/187815517","html_url":"https://github.com/jemalloc/jemalloc/pull/330#issuecomment-187815517","issue_url":"https://api.github.com/repos/jemalloc/jemalloc/issues/330","id":187815517,"user":{"login":"jasone","id":245970,"avatar_url":"https://avatars.githubusercontent.com/u/245970?v=3","gravatar_id":"","url":"https://api.github.com/users/jasone","html_url":"https://github.com/jasone","followers_url":"https://api.github.com/users/jasone/followers","following_url":"https://api.github.com/users/jasone/following{/other_user}","gists_url":"https://api.github.com/users/jasone/gists{/gist_id}","starred_url":"https://api.github.com/users/jasone/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jasone/subscriptions","organizations_url":"https://api.github.com/users/jasone/orgs","repos_url":"https://api.github.com/users/jasone/repos","events_url":"https://api.github.com/users/jasone/events{/privacy}","received_events_url":"https://api.github.com/users/jasone/received_events","type":"User","site_admin":false},"created_at":"2016-02-23T17:50:16Z","updated_at":"2016-02-23T17:50:16Z","body":"Now that the run quantization issues are sorted out, I'm looking at the main part of your diff (per size class run trees).  The size class index computations can now be simplified to use ```run_quantize_floor()```, and there are some style nits, but otherwise it looks good to me.\r\n\r\nI'm not super excited about the related (rbt-nil removal)[331], but I'll run the change through some (benchmarks)[http://canonware.com/rb/], and if there isn't a substantial impact, I'm game for these changes."}}