{"id":169,"date":"2014-02-05T18:45:33","date_gmt":"2014-02-05T18:45:33","guid":{"rendered":"http:\/\/blog.ignoranthack.me\/?p=169"},"modified":"2014-04-19T14:46:12","modified_gmt":"2014-04-19T14:46:12","slug":"httperf-tuning-for-freebsd-testing","status":"publish","type":"post","link":"http:\/\/blog.ignoranthack.me\/?p=169","title":{"rendered":"httperf tuning for #FreeBSD testing"},"content":{"rendered":"<p>Was playing around with httperf to excercise Apache \/ stunnel SSl benchmarks on FreeBSD this week and ran into the code that nerfs simultaneous connections down from the environment ulimit of maxfiles to the limit FD_SETSIZE as defined in &lt;select.h&gt;.<\/p>\n<p>One can override this at compile time and push the system harder by passing in some .\/configure foo:<\/p>\n<p>env CC=&#8221;cc -DFD_SETSIZE=4096&#8243;<\/p>\n<p>However, you will then be able to max out the number of ports in use very quickly if you try to use stunnel and apache in this configuration.\u00a0 I noted that on our systems we raise the low port number and reduce the high port number for connections:<\/p>\n<p>net.inet.ip.portrange.first=20000<\/p>\n<p>net.inet.ip.portrange.last=49151<\/p>\n<p>I set first down to 2000 and last up to 65534 for my testing.\u00a0 This gives me quite a bit more ports to use in testing.\u00a0 At this point I can run stunnel on 443 forwarding to apache on localhost:80 and get more than 8k simultaneous connections when using SSL accelerators on FreeBSD 10<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Was playing around with httperf to excercise Apache \/ stunnel SSl benchmarks on FreeBSD this week and ran into the code that nerfs simultaneous connections down from the environment ulimit of maxfiles to the limit FD_SETSIZE as defined in &lt;select.h&gt;. One can override this at compile time and push the system harder by passing in [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"ngg_post_thumbnail":0,"_share_on_mastodon":"0"},"categories":[2],"tags":[5],"share_on_mastodon":{"url":"","error":""},"_links":{"self":[{"href":"http:\/\/blog.ignoranthack.me\/index.php?rest_route=\/wp\/v2\/posts\/169"}],"collection":[{"href":"http:\/\/blog.ignoranthack.me\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/blog.ignoranthack.me\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/blog.ignoranthack.me\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/blog.ignoranthack.me\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=169"}],"version-history":[{"count":2,"href":"http:\/\/blog.ignoranthack.me\/index.php?rest_route=\/wp\/v2\/posts\/169\/revisions"}],"predecessor-version":[{"id":171,"href":"http:\/\/blog.ignoranthack.me\/index.php?rest_route=\/wp\/v2\/posts\/169\/revisions\/171"}],"wp:attachment":[{"href":"http:\/\/blog.ignoranthack.me\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=169"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/blog.ignoranthack.me\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=169"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/blog.ignoranthack.me\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=169"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}