{"action":"created","issue":{"url":"https://api.github.com/repos/hashrocket/websocket-shootout/issues/17","repository_url":"https://api.github.com/repos/hashrocket/websocket-shootout","labels_url":"https://api.github.com/repos/hashrocket/websocket-shootout/issues/17/labels{/name}","comments_url":"https://api.github.com/repos/hashrocket/websocket-shootout/issues/17/comments","events_url":"https://api.github.com/repos/hashrocket/websocket-shootout/issues/17/events","html_url":"https://github.com/hashrocket/websocket-shootout/pull/17","id":174902721,"number":17,"title":"Clojure speedup","user":{"login":"jcf","id":18374,"avatar_url":"https://avatars.githubusercontent.com/u/18374?v=3","gravatar_id":"","url":"https://api.github.com/users/jcf","html_url":"https://github.com/jcf","followers_url":"https://api.github.com/users/jcf/followers","following_url":"https://api.github.com/users/jcf/following{/other_user}","gists_url":"https://api.github.com/users/jcf/gists{/gist_id}","starred_url":"https://api.github.com/users/jcf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jcf/subscriptions","organizations_url":"https://api.github.com/users/jcf/orgs","repos_url":"https://api.github.com/users/jcf/repos","events_url":"https://api.github.com/users/jcf/events{/privacy}","received_events_url":"https://api.github.com/users/jcf/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2016-09-03T15:47:58Z","updated_at":"2016-09-19T22:04:53Z","closed_at":"2016-09-19T22:02:09Z","pull_request":{"url":"https://api.github.com/repos/hashrocket/websocket-shootout/pulls/17","html_url":"https://github.com/hashrocket/websocket-shootout/pull/17","diff_url":"https://github.com/hashrocket/websocket-shootout/pull/17.diff","patch_url":"https://github.com/hashrocket/websocket-shootout/pull/17.patch"},"body":"I'm opening this in the hope I (and maybe others) can learn a bit more about optimising a Clojure application. I have a little experience with this and can click around in YourKit, but there are definitely some more expert people out there who might be able to educate us all.\r\n\r\nSome ideas I've been playing with to get a bit more bang for our buck:\r\n\r\n1. Replace use of `partial` with an anonymous function\r\n1. Avoid logging when not absolutely required\r\n1. Remove overhead from ring-defaults\r\n1. Make sure we're using Clojure 1.8.0 and not 1.7.0\r\n1. Give the JVM loads of memory, and use G1GC with a low target GC time\r\n\r\nI think the real win will come from proper GC tuning. I'm not sure exactly what options were used when running `java -jar build/app.jar` so maybe this won't help?\r\n\r\nI've profiled this locally and it looks pretty good. GC pauses are down to less than 50 milliseconds, and most of the time is spent writing bytes via `sun.nio.ch.SocketChannelImpl.write(ByteBuffer[], int, int)`.\r\n\r\nUnfortunately, I don't have two nice powerful Ubuntu machines to really test out these changes, so hope maybe someone from Hashrocket might do me a favour and run the benchmarks for me?"},"comment":{"url":"https://api.github.com/repos/hashrocket/websocket-shootout/issues/comments/248141850","html_url":"https://github.com/hashrocket/websocket-shootout/pull/17#issuecomment-248141850","issue_url":"https://api.github.com/repos/hashrocket/websocket-shootout/issues/17","id":248141850,"user":{"login":"jackc","id":94130,"avatar_url":"https://avatars.githubusercontent.com/u/94130?v=3","gravatar_id":"","url":"https://api.github.com/users/jackc","html_url":"https://github.com/jackc","followers_url":"https://api.github.com/users/jackc/followers","following_url":"https://api.github.com/users/jackc/following{/other_user}","gists_url":"https://api.github.com/users/jackc/gists{/gist_id}","starred_url":"https://api.github.com/users/jackc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jackc/subscriptions","organizations_url":"https://api.github.com/users/jackc/orgs","repos_url":"https://api.github.com/users/jackc/repos","events_url":"https://api.github.com/users/jackc/events{/privacy}","received_events_url":"https://api.github.com/users/jackc/received_events","type":"User","site_admin":false},"created_at":"2016-09-19T22:04:53Z","updated_at":"2016-09-19T22:04:53Z","body":"We optimized our test environment to raise the performance ceiling and tried this again.\r\n\r\nThe JVM benchmarks seem to be rather variable so we need to run them many times to get a sense for what difference a change makes. It's very slight, but these changes now seem to make a small difference, so I merged them in."}}
{"actor":{"display_login":"jackc"}}