{"action":"created","issue":{"url":"https://api.github.com/repos/facebook/rocksdb/issues/775","labels_url":"https://api.github.com/repos/facebook/rocksdb/issues/775/labels{/name}","comments_url":"https://api.github.com/repos/facebook/rocksdb/issues/775/comments","events_url":"https://api.github.com/repos/facebook/rocksdb/issues/775/events","html_url":"https://github.com/facebook/rocksdb/pull/775","id":111895336,"number":775,"title":"Limit RandomAccess Buffer Size and implement compaction read ahead.","user":{"login":"yuslepukhin","id":11303988,"avatar_url":"https://avatars.githubusercontent.com/u/11303988?v=3","gravatar_id":"","url":"https://api.github.com/users/yuslepukhin","html_url":"https://github.com/yuslepukhin","followers_url":"https://api.github.com/users/yuslepukhin/followers","following_url":"https://api.github.com/users/yuslepukhin/following{/other_user}","gists_url":"https://api.github.com/users/yuslepukhin/gists{/gist_id}","starred_url":"https://api.github.com/users/yuslepukhin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yuslepukhin/subscriptions","organizations_url":"https://api.github.com/users/yuslepukhin/orgs","repos_url":"https://api.github.com/users/yuslepukhin/repos","events_url":"https://api.github.com/users/yuslepukhin/events{/privacy}","received_events_url":"https://api.github.com/users/yuslepukhin/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/facebook/rocksdb/labels/CLA%20Signed","name":"CLA Signed","color":"009900"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-10-16T19:24:33Z","updated_at":"2015-10-19T17:58:02Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/facebook/rocksdb/pulls/775","html_url":"https://github.com/facebook/rocksdb/pull/775","diff_url":"https://github.com/facebook/rocksdb/pull/775.diff","patch_url":"https://github.com/facebook/rocksdb/pull/775.patch"},"body":"  Investigation shows that WinRandomAccess aligned buffer that we use for\r\n  unbuffered read access grows to the the size of the largest read\r\n  and remains so for a long period of time which impacts memory\r\n  footprint. We introduce a new DBoption random_access_max_buffer_size that\r\n  limits the size of the buffer with 1Mb default. For reads larger\r\n  than the option value we create one shot large buffers.\r\n  We also implement compaction_readahead option while re-using the same\r\n  buffer. When readahead is in effect we allocate a fixed size buffer\r\n  and use one shot buffer for very large reads.\r\n  We propagate both options above to the env ooptions to make them\r\n  available for Windows environment code.\r\n  We add a hint function that enables ReadAhead when necessary."},"comment":{"url":"https://api.github.com/repos/facebook/rocksdb/issues/comments/149297648","html_url":"https://github.com/facebook/rocksdb/pull/775#issuecomment-149297648","issue_url":"https://api.github.com/repos/facebook/rocksdb/issues/775","id":149297648,"user":{"login":"siying","id":5334567,"avatar_url":"https://avatars.githubusercontent.com/u/5334567?v=3","gravatar_id":"","url":"https://api.github.com/users/siying","html_url":"https://github.com/siying","followers_url":"https://api.github.com/users/siying/followers","following_url":"https://api.github.com/users/siying/following{/other_user}","gists_url":"https://api.github.com/users/siying/gists{/gist_id}","starred_url":"https://api.github.com/users/siying/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/siying/subscriptions","organizations_url":"https://api.github.com/users/siying/orgs","repos_url":"https://api.github.com/users/siying/repos","events_url":"https://api.github.com/users/siying/events{/privacy}","received_events_url":"https://api.github.com/users/siying/received_events","type":"User","site_admin":false},"created_at":"2015-10-19T17:58:02Z","updated_at":"2015-10-19T17:58:02Z","body":"I will take a further look today."}}