<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/css" href="/stylesheets/rss.css"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">
  <channel>
    <title>Segment7: socket_sendfile and socket_accept_filter</title>
    <link>http://blog.segment7.net/articles/2006/03/23/socket_sendfile-and-socket_accept_filter</link>
    <language>en-us</language>
    <ttl>40</ttl>
    <description>The Blog</description>
    <item>
      <title>socket_sendfile and socket_accept_filter</title>
      <description>&lt;p&gt;These are two packages that I use to speed up WEBrick image serving now freshly released.  Unfortunately I haven&amp;#8217;t tested them on any platform other than FreeBSD so please &lt;a href="http://rubyforge.org/tracker/?atid=4981&amp;#38;group_id=1266&amp;#38;func=browse"&gt;file bugs&lt;/a&gt; if they don&amp;#8217;t work for you.&lt;/p&gt;


	&lt;pre&gt;&lt;code&gt;$ sudo gem install socket_sendfile&lt;/code&gt;&lt;/pre&gt;


	&lt;pre&gt;&lt;code&gt;$ sudo gem install socket_accept_filter&lt;/code&gt;&lt;/pre&gt;


	&lt;p&gt;&lt;a href="http://dev.robotcoop.com/Libraries/socket_sendfile/index.html"&gt;socket_sendfile&lt;/a&gt; adds &lt;a href="http://www.freebsd.org/cgi/man.cgi?query=sendfile"&gt;sendfile(2)&lt;/a&gt; to Socket and forms the cornerstone of our WEBrick image serving.&lt;/p&gt;


	&lt;p&gt;&lt;a href="http://dev.robotcoop.com/Libraries/socket_accept_filter/index.html"&gt;socket_accept_filter&lt;/a&gt; makes it easy to set the SO_ACCEPTFILTER socket option so you can enable the &lt;a href="http://www.freebsd.org/cgi/man.cgi?query=accf_http"&gt;accf_http(9)&lt;/a&gt; and &lt;a href="http://www.freebsd.org/cgi/man.cgi?query=accf_data"&gt;accf_data(9)&lt;/a&gt; accept filters.  Accept filters delay the return from &lt;a href="http://www.freebsd.org/cgi/man.cgi?query=accept"&gt;accept(2)&lt;/a&gt; until enough data has arrived on the socket for processing.&lt;/p&gt;


	&lt;p&gt;Shortly I&amp;#8217;ll have enough software released to do a full write-up of high-volume image serving with WEBrick.&lt;/p&gt;
</description>
      <pubDate>Thu, 23 Mar 2006 17:19:00 -0800</pubDate>
      <guid isPermaLink="false">urn:uuid:9b445a0f-332d-4c9f-9d95-3d354eb11dc7</guid>
      <author>drbrain@segment7.net (Eric Hodel)</author>
      <link>http://blog.segment7.net/articles/2006/03/23/socket_sendfile-and-socket_accept_filter</link>
      <category>FreeBSD</category>
      <category>Robot Co-op</category>
      <category>Software</category>
    </item>
    <item>
      <title>"socket_sendfile and socket_accept_filter" by Eric Hodel</title>
      <description>&lt;p&gt;Not yet, but Real Soon Now.  I have one more chunk of functionality to extract.&lt;/p&gt;</description>
      <pubDate>Fri, 24 Mar 2006 10:05:24 -0800</pubDate>
      <guid isPermaLink="false">urn:uuid:9410d1d2-b992-4338-9f8d-449ce5589a58</guid>
      <link>http://blog.segment7.net/articles/2006/03/23/socket_sendfile-and-socket_accept_filter#comment-138</link>
    </item>
    <item>
      <title>"socket_sendfile and socket_accept_filter" by J. Weir</title>
      <description>&lt;p&gt;Are there any posts explaining the benefits of using Webrick over Apache or Lighttpd for serving images?  Obviously there must be, but I don&amp;#8217;t understand what those are.&lt;/p&gt;</description>
      <pubDate>Fri, 24 Mar 2006 08:10:11 -0800</pubDate>
      <guid isPermaLink="false">urn:uuid:9024c185-b7d2-4f68-99d0-8c4dc70a8e46</guid>
      <link>http://blog.segment7.net/articles/2006/03/23/socket_sendfile-and-socket_accept_filter#comment-137</link>
    </item>
  </channel>
</rss>
