From owner-freebsd-questions@FreeBSD.ORG Fri Apr 11 18:36:28 2014 Return-Path: Delivered-To: questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BB260C47 for ; Fri, 11 Apr 2014 18:36:28 +0000 (UTC) Received: from mail-pd0-x236.google.com (mail-pd0-x236.google.com [IPv6:2607:f8b0:400e:c02::236]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 97E191D92 for ; Fri, 11 Apr 2014 18:36:28 +0000 (UTC) Received: by mail-pd0-f182.google.com with SMTP id y10so5638777pdj.13 for ; Fri, 11 Apr 2014 11:36:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=kIrJUseXf19CViDbn080RRgimzPmvwqT1SlUu09yl4I=; b=yDuub+KCti3kBHZjCyo09sSkZfM9ARMCreNGmpOJ6FeVq30BuO+bhFzwr6w5TzU59m sJuITk2nYm5933sVFaXNEyy3+yxAzy0pkWt6Ti4y0df4wtF9LX69tqlyPyN0KKfUD+hf L9OjVgAKUqk34M2lHQnhbcExtA4PVDrQvO88QH0GbMY463kRZjfCyVhdCLWRwJA1EZHg WAItvh6TZByyU2B8VyXtdyCNQCWyjWtX6wbe/dDAkKPkMD3jJknRQvQO3cRZSk77mRlq lbouUGojVz5vsmYyVvGG9N0eXqhSdvzZqMm4hiK5wQiku1rzIpha8LLHKp7pfu12EIb3 JhRA== MIME-Version: 1.0 X-Received: by 10.68.135.42 with SMTP id pp10mr29407503pbb.58.1397241388197; Fri, 11 Apr 2014 11:36:28 -0700 (PDT) Received: by 10.66.145.7 with HTTP; Fri, 11 Apr 2014 11:36:28 -0700 (PDT) Date: Fri, 11 Apr 2014 11:36:28 -0700 Message-ID: Subject: Comparison of FreeBSD sendfile() and Linux sendfile() From: pete wright To: freebsd-questions Content-Type: text/plain; charset=UTF-8 X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Apr 2014 18:36:28 -0000 Hi All, I am doing some work on linux with the Kafka message bus: http://kafka.apache.org/documentation.html One of the interesting things that Kafka does is when I message/event needs to be sent to a client is invokes the linux sendfile() function, thus eliminating the need to map the blocks on disk into the JRE then out over the wire. It is a pretty good use of this function. I am pretty familiar with the performance gains of this on CentOS/Linux systems but was wondering if the FreeBSD implementation would provide similar performance enhancements? Kafka run's inside a Java VM, and aside from using sendfile() I believe most of the other bits of code are pretty platform agnostic - so obviously I'm interested in seeing if I could run Kafka on FreeBSD. I am currently reading the 2005 Usenix paper referenced in the FreeBSD sendfile man page, but would love to hear opinions/war-stories and the like from others :) Thanks in advance! -pete -- pete wright www.nycbug.org @nomadlogicLA