{"action":"created","issue":{"url":"https://api.github.com/repos/dotnet/coreclr/issues/17078","repository_url":"https://api.github.com/repos/dotnet/coreclr","labels_url":"https://api.github.com/repos/dotnet/coreclr/issues/17078/labels{/name}","comments_url":"https://api.github.com/repos/dotnet/coreclr/issues/17078/comments","events_url":"https://api.github.com/repos/dotnet/coreclr/issues/17078/events","html_url":"https://github.com/dotnet/coreclr/pull/17078","id":307067174,"number":17078,"title":"Simple trim of ArrayPool buffers","user":{"login":"JeremyKuhne","id":8184940,"avatar_url":"https://avatars3.githubusercontent.com/u/8184940?v=4","gravatar_id":"","url":"https://api.github.com/users/JeremyKuhne","html_url":"https://github.com/JeremyKuhne","followers_url":"https://api.github.com/users/JeremyKuhne/followers","following_url":"https://api.github.com/users/JeremyKuhne/following{/other_user}","gists_url":"https://api.github.com/users/JeremyKuhne/gists{/gist_id}","starred_url":"https://api.github.com/users/JeremyKuhne/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JeremyKuhne/subscriptions","organizations_url":"https://api.github.com/users/JeremyKuhne/orgs","repos_url":"https://api.github.com/users/JeremyKuhne/repos","events_url":"https://api.github.com/users/JeremyKuhne/events{/privacy}","received_events_url":"https://api.github.com/users/JeremyKuhne/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/dotnet/coreclr/milestones/10","html_url":"https://github.com/dotnet/coreclr/milestone/10","labels_url":"https://api.github.com/repos/dotnet/coreclr/milestones/10/labels","id":2344332,"number":10,"title":"2.1.0","description":".NET Core 2.1, next major release. See [official release dates](https://github.com/dotnet/core/blob/master/roadmap.md) for details.","creator":{"login":"karelz","id":5776068,"avatar_url":"https://avatars2.githubusercontent.com/u/5776068?v=4","gravatar_id":"","url":"https://api.github.com/users/karelz","html_url":"https://github.com/karelz","followers_url":"https://api.github.com/users/karelz/followers","following_url":"https://api.github.com/users/karelz/following{/other_user}","gists_url":"https://api.github.com/users/karelz/gists{/gist_id}","starred_url":"https://api.github.com/users/karelz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/karelz/subscriptions","organizations_url":"https://api.github.com/users/karelz/orgs","repos_url":"https://api.github.com/users/karelz/repos","events_url":"https://api.github.com/users/karelz/events{/privacy}","received_events_url":"https://api.github.com/users/karelz/received_events","type":"User","site_admin":false},"open_issues":56,"closed_issues":1552,"state":"open","created_at":"2017-02-23T20:40:02Z","updated_at":"2018-03-27T21:10:16Z","due_on":null,"closed_at":null},"comments":31,"created_at":"2018-03-20T22:51:59Z","updated_at":"2018-03-27T21:12:29Z","closed_at":null,"author_association":"MEMBER","pull_request":{"url":"https://api.github.com/repos/dotnet/coreclr/pulls/17078","html_url":"https://github.com/dotnet/coreclr/pull/17078","diff_url":"https://github.com/dotnet/coreclr/pull/17078.diff","patch_url":"https://github.com/dotnet/coreclr/pull/17078.patch"},"body":"Trim ArrayPool buffers on Gen2 GC if the buffer stack hasn't been emptied for awhile. If you haven't pulled all of the buffers in the past 10 seconds, let loose the top buffer on the stack and give the stack another 2 seconds of potential life. When the stack gets it's bottom buffer returned the clock resets.\r\n\r\nThis is taking clues from PinnableBufferCache, which has been split into separate files and tweaked for coding standards. Trying to introduce as little overhead/complexity as possible...\r\n\r\nIf this is a reasonable approach we may want to consider unifying on the Tls pool. I can potentially make a similar change to the other pool implementation.\r\n\r\ncc: @danmosemsft"},"comment":{"url":"https://api.github.com/repos/dotnet/coreclr/issues/comments/376677124","html_url":"https://github.com/dotnet/coreclr/pull/17078#issuecomment-376677124","issue_url":"https://api.github.com/repos/dotnet/coreclr/issues/17078","id":376677124,"user":{"login":"JeremyKuhne","id":8184940,"avatar_url":"https://avatars3.githubusercontent.com/u/8184940?v=4","gravatar_id":"","url":"https://api.github.com/users/JeremyKuhne","html_url":"https://github.com/JeremyKuhne","followers_url":"https://api.github.com/users/JeremyKuhne/followers","following_url":"https://api.github.com/users/JeremyKuhne/following{/other_user}","gists_url":"https://api.github.com/users/JeremyKuhne/gists{/gist_id}","starred_url":"https://api.github.com/users/JeremyKuhne/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JeremyKuhne/subscriptions","organizations_url":"https://api.github.com/users/JeremyKuhne/orgs","repos_url":"https://api.github.com/users/JeremyKuhne/repos","events_url":"https://api.github.com/users/JeremyKuhne/events{/privacy}","received_events_url":"https://api.github.com/users/JeremyKuhne/received_events","type":"User","site_admin":false},"created_at":"2018-03-27T21:12:29Z","updated_at":"2018-03-27T21:12:29Z","author_association":"MEMBER","body":"> it's just more efficient if you can trim a good amount at a time.\r\n\r\nHow about tweaking the medium trim count up if the size is bigger? We have a max of 8 on each stack and we're trimming 1 or 2 depending on the memory pressure.  Could make 2 -> 3 for sizes greater than 16 bytes? 4 for > 32 bytes?"}}
{"actor":{"display_login":"JeremyKuhne"}}