{"action":"created","issue":{"url":"https://api.github.com/repos/real-logic/Aeron/issues/333","repository_url":"https://api.github.com/repos/real-logic/Aeron","labels_url":"https://api.github.com/repos/real-logic/Aeron/issues/333/labels{/name}","comments_url":"https://api.github.com/repos/real-logic/Aeron/issues/333/comments","events_url":"https://api.github.com/repos/real-logic/Aeron/issues/333/events","html_url":"https://github.com/real-logic/Aeron/issues/333","id":219797550,"number":333,"title":"Aeron performance help","user":{"login":"GenuineJyn","id":8956617,"avatar_url":"https://avatars0.githubusercontent.com/u/8956617?v=3","gravatar_id":"","url":"https://api.github.com/users/GenuineJyn","html_url":"https://github.com/GenuineJyn","followers_url":"https://api.github.com/users/GenuineJyn/followers","following_url":"https://api.github.com/users/GenuineJyn/following{/other_user}","gists_url":"https://api.github.com/users/GenuineJyn/gists{/gist_id}","starred_url":"https://api.github.com/users/GenuineJyn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GenuineJyn/subscriptions","organizations_url":"https://api.github.com/users/GenuineJyn/orgs","repos_url":"https://api.github.com/users/GenuineJyn/repos","events_url":"https://api.github.com/users/GenuineJyn/events{/privacy}","received_events_url":"https://api.github.com/users/GenuineJyn/received_events","type":"User","site_admin":false},"labels":[{"id":79278863,"url":"https://api.github.com/repos/real-logic/Aeron/labels/question","name":"question","color":"cc317c","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2017-04-06T06:20:53Z","updated_at":"2017-04-06T08:04:28Z","closed_at":null,"body":"According to https://github.com/real-logic/Aeron/wiki/Performance-Testing, I develop a c++ publisher and run it on a host, and develop a c++ subscriber on another host.  Then the performance is not very good. the size of  communication data is 5845200, and Retransmission is serious！ as follows is my ubuntu configuration:\r\nnet.core.rmem_default = 33554432\r\nnet.core.rmem_max = 33554432\r\nnet.core.wmem_default = 33554432\r\nnet.core.wmem_max = 33554432\r\nnet.ipv4.igmp_max_memberships = 20\r\nnet.ipv4.tcp_mem = 8388608      8388608 8388608\r\nnet.ipv4.tcp_rmem = 4096        87380   6291456\r\nnet.ipv4.tcp_wmem = 4096        65536   8388608\r\nnet.ipv4.udp_mem = 382437       509919  764874\r\nnet.ipv4.udp_rmem_min = 4096\r\nnet.ipv4.udp_wmem_min = 4096\r\n\r\nand media driver arguments as follows:\r\njava -cp aeron-samples/build/libs/samples.jar \\                                                     \r\n     -Daeron.term.buffer.sparse.file=false \\                                                        \r\n     -Daeron.threading.mode=DEDICATED \\                                                             \r\n     -Daeron.conductor.idle.strategy=org.agrona.concurrent.BusySpinIdleStrategy \\                   \r\n     -Daeron.receiver.idle.strategy=org.agrona.concurrent.BusySpinIdleStrategy \\                    \r\n     -Daeron.sender.idle.strategy=org.agrona.concurrent.BusySpinIdleStrategy \\                      \r\n     -Daeron.term.buffer.length=536870912 \\                                                         \r\n     -Daeron.publication.term.window.length=536870912 \\                                             \r\n     -Daeron.rcv.initial.window.length=134217728 \\                                                  \r\n     -Daeron.mtu.length=16384 \\                                                                     \r\n     -Daeron.socket.so_sndbuf=134217728 \\                                                           \r\n     -Daeron.socket.so_rcvbuf=134217728 \\                                                           \r\n     -Dagrona.disable.bounds.checks=true \\                                                          \r\n     -Daeron.publication.unblock.timeout=1000 \\                                                     \r\n     -Daeron.publication.linger.timeout=1000 \\                                                      \r\n     -XX:BiasedLockingStartupDelay=0 \\                                                              \r\n     -XX:+UnlockDiagnosticVMOptions \\                                                               \r\n     -XX:GuaranteedSafepointInterval=300000 \\                                                       \r\n     io.aeron.driver.MediaDriver"},"comment":{"url":"https://api.github.com/repos/real-logic/Aeron/issues/comments/292099605","html_url":"https://github.com/real-logic/Aeron/issues/333#issuecomment-292099605","issue_url":"https://api.github.com/repos/real-logic/Aeron/issues/333","id":292099605,"user":{"login":"GenuineJyn","id":8956617,"avatar_url":"https://avatars0.githubusercontent.com/u/8956617?v=3","gravatar_id":"","url":"https://api.github.com/users/GenuineJyn","html_url":"https://github.com/GenuineJyn","followers_url":"https://api.github.com/users/GenuineJyn/followers","following_url":"https://api.github.com/users/GenuineJyn/following{/other_user}","gists_url":"https://api.github.com/users/GenuineJyn/gists{/gist_id}","starred_url":"https://api.github.com/users/GenuineJyn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GenuineJyn/subscriptions","organizations_url":"https://api.github.com/users/GenuineJyn/orgs","repos_url":"https://api.github.com/users/GenuineJyn/repos","events_url":"https://api.github.com/users/GenuineJyn/events{/privacy}","received_events_url":"https://api.github.com/users/GenuineJyn/received_events","type":"User","site_admin":false},"created_at":"2017-04-06T08:04:28Z","updated_at":"2017-04-06T08:04:28Z","body":"the size of Communication data is 5845200, so the buffer sizes is as shown. if the buffer sizes is small, the question is more serious.\r\n\r\nI know  likely ADMIN_ACTION\r\nstatic const std::int64_t BACK_PRESSURED = -2;\r\nstatic const std::int64_t ADMIN_ACTION = -3;\r\nstatic const std::int64_t PUBLICATION_CLOSED = -4;\r\n\r\nadd offer again,  but about 50 package is still lost. and what size should buffer lengths be set, there is a empirical value?\r\n\r\n        uint32_t total_times = 1000;\r\n        uint32_t time = 0;\r\n\r\n        auto begin = std::chrono::system_clock::now();\r\n        //buffer_len = 5845200;\r\n        while (time < total_times) {\r\n            std::int64_t result = publication->offer(src_buffer, 0, buffer_len);\r\n            if (result < 0) {\r\n                if (NOT_CONNECTED == result) {\r\n                    std::cout << \" not connected yet.\" << std::endl;\r\n                } else if (BACK_PRESSURED == result) {\r\n                    std::cout << \" back presured.\" << std::endl;\r\n                    do {\r\n                        result = publication->offer(src_buffer, 0, buffer_len);\r\n                        std::this_thread::sleep_for(std::chrono::milliseconds(40));\r\n                    } while (result == 0);\r\n                } else {\r\n                    std::cout << \" ah?! unknown \" << std::endl;\r\n                }\r\n            }\r\n            ++time;\r\n            std::this_thread::sleep_for(std::chrono::milliseconds(40));\r\n            //std::this_thread::sleep_for(std::chrono::microseconds(800));\r\n        }\r\n        auto end = std::chrono::system_clock::now();"}}
{"actor":{"display_login":"GenuineJyn"}}