{"action":"created","issue":{"url":"https://api.github.com/repos/JuliaLang/julia/issues/16971","repository_url":"https://api.github.com/repos/JuliaLang/julia","labels_url":"https://api.github.com/repos/JuliaLang/julia/issues/16971/labels{/name}","comments_url":"https://api.github.com/repos/JuliaLang/julia/issues/16971/comments","events_url":"https://api.github.com/repos/JuliaLang/julia/issues/16971/events","html_url":"https://github.com/JuliaLang/julia/issues/16971","id":160754386,"number":16971,"title":"Poor performance of TCPServer/TCPSocket on Julia 0.4","user":{"login":"dfdx","id":428171,"avatar_url":"https://avatars.githubusercontent.com/u/428171?v=3","gravatar_id":"","url":"https://api.github.com/users/dfdx","html_url":"https://github.com/dfdx","followers_url":"https://api.github.com/users/dfdx/followers","following_url":"https://api.github.com/users/dfdx/following{/other_user}","gists_url":"https://api.github.com/users/dfdx/gists{/gist_id}","starred_url":"https://api.github.com/users/dfdx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dfdx/subscriptions","organizations_url":"https://api.github.com/users/dfdx/orgs","repos_url":"https://api.github.com/users/dfdx/repos","events_url":"https://api.github.com/users/dfdx/events{/privacy}","received_events_url":"https://api.github.com/users/dfdx/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/JuliaLang/julia/labels/won't%20fix","name":"won't fix","color":"e10c02"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2016-06-16T20:33:48Z","updated_at":"2016-06-17T13:56:59Z","closed_at":null,"body":"Here's a simple client-server pair based on Julia TCP sockets:\r\n\r\n```julia\r\n# server\r\nserver = listen(2000)\r\nwhile true\r\n    sock = accept(server)\r\n    begin    \r\n        while true\r\n            @time readbytes(sock, 1024*1024)\r\n        end\r\n    end\r\nend\r\n```\r\n```julia\r\n# client\r\nsock = connect(2000)\r\nMb = rand(UInt8, 1024*1024)   # 1 Mb of data\r\nfor i=1:1_000 write(sock, Mb) end\r\n```\r\nEssentially, the client simply writes 1Gb of data to the socket and the server reads it in chunks of 1Mb and measures resulting time. When I run this code in 2 different REPLs, I get the following measurements: \r\n\r\n**Julia 0.3.12**\r\n> elapsed time: 0.030572218 seconds (1048640 bytes allocated)\r\nelapsed time: 0.030935904 seconds (1048640 bytes allocated)\r\nelapsed time: 0.030983416 seconds (1048640 bytes allocated)\r\nelapsed time: 0.031210029 seconds (1048640 bytes allocated)\r\n\r\n~32Mb/sec\r\n\r\n**Julia 0.4.5**\r\n> 0.026118 seconds (2 allocations: 1.000 MB)\r\n  0.026585 seconds (2 allocations: 1.000 MB)\r\n  0.026631 seconds (2 allocations: 1.000 MB)\r\n  0.025656 seconds (2 allocations: 1.000 MB)\r\n\r\n~38Mb/sec\r\n\r\n**Julia 0.5.0-dev+4816 (2016-06-16)**\r\n\r\n> 0.000365 seconds (89 allocations: 1.011 MB)\r\n  0.000355 seconds (89 allocations: 1.011 MB)\r\n  0.000328 seconds (89 allocations: 1.011 MB)\r\n  0.000323 seconds (89 allocations: 1.011 MB)\r\n\r\n~2.8Gb/sec, 75 times faster than the previous result.\r\n\r\nDoes it sound reasonable to investigate what have caused such a dramatic change in Julia 0.5?"},"comment":{"url":"https://api.github.com/repos/JuliaLang/julia/issues/comments/226775429","html_url":"https://github.com/JuliaLang/julia/issues/16971#issuecomment-226775429","issue_url":"https://api.github.com/repos/JuliaLang/julia/issues/16971","id":226775429,"user":{"login":"dfdx","id":428171,"avatar_url":"https://avatars.githubusercontent.com/u/428171?v=3","gravatar_id":"","url":"https://api.github.com/users/dfdx","html_url":"https://github.com/dfdx","followers_url":"https://api.github.com/users/dfdx/followers","following_url":"https://api.github.com/users/dfdx/following{/other_user}","gists_url":"https://api.github.com/users/dfdx/gists{/gist_id}","starred_url":"https://api.github.com/users/dfdx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dfdx/subscriptions","organizations_url":"https://api.github.com/users/dfdx/orgs","repos_url":"https://api.github.com/users/dfdx/repos","events_url":"https://api.github.com/users/dfdx/events{/privacy}","received_events_url":"https://api.github.com/users/dfdx/received_events","type":"User","site_admin":false},"created_at":"2016-06-17T13:56:59Z","updated_at":"2016-06-17T13:56:59Z","body":"I tracked changes back to this January, but further testing goes pretty hard because many commits are not buildable. Here's one example of error during compilation from Dec 31, 2015:\r\n\r\n**commit 17348360ab9e61c5a66618b9f3cbb990e24e90de**\r\n\r\n> /home/username/work/repos/julia/usr/lib/libjulia.so: undefined reference to `jl_gc_preserve'\r\ncollect2: error: ld returned 1 exit status\r\nmake[1]: *** [/home/username/work/repos/julia/usr/bin/julia] Error 1\r\nmake: *** [julia-ui-release] Error 2\r\n\r\nI'd assume that some commits has just been broken, but I can hardly find any working before  ~ Jan 20. Any suggestions why this may happen? \r\n"}}
{"actor":{"display_login":"dfdx"}}