From owner-freebsd-questions@FreeBSD.ORG Tue Jul 27 19:15:40 2010 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B58B51065679 for ; Tue, 27 Jul 2010 19:15:40 +0000 (UTC) (envelope-from debackerl@gmail.com) Received: from mail-fx0-f54.google.com (mail-fx0-f54.google.com [209.85.161.54]) by mx1.freebsd.org (Postfix) with ESMTP id 4647A8FC14 for ; Tue, 27 Jul 2010 19:15:39 +0000 (UTC) Received: by fxm13 with SMTP id 13so879392fxm.13 for ; Tue, 27 Jul 2010 12:15:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:received:from:date :message-id:subject:to:content-type; bh=doLwHFB+3RYoE2y5LJfQn9GW0IUrolaJFlAO5X46GIk=; b=g65mk+eoG8gRCFDT3A75qb0TGT5iD5b7wxrEITAHIhIlER+fYizqW1b5m/dOHJMtxb 6ftmDOhTOfRemYirHnY9viz/10BpeqvZCZVKmO5oiip7ULeqosmhoq+TjqVq3PykFptE x4YEd2fzd+q2D/5bAxyTB+RLkWRKcmkqiqMME= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:from:date:message-id:subject:to:content-type; b=DgQTEz6H2O/dJRY7lmulnetTtG+EaS1IyFCLtUMyovVaSaCIwhbRKfj3YNeMyNtv7/ z7+E5kAHLlo3LFeimR1S6Qdk7TEdI37lDJ2EE+3+1Ei091McA3nIZTL+BqMkIW0QJaDz XDZksEvj5uC7iQ9I1dg1H1LUW+M9G8NWePkNI= Received: by 10.223.117.194 with SMTP id s2mr8542302faq.57.1280256354124; Tue, 27 Jul 2010 11:45:54 -0700 (PDT) MIME-Version: 1.0 Received: by 10.223.115.193 with HTTP; Tue, 27 Jul 2010 11:45:34 -0700 (PDT) From: Debacker Date: Tue, 27 Jul 2010 20:45:34 +0200 Message-ID: To: freebsd-questions@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: Real-Time Video Recording (ionice equivalent) X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jul 2010 19:15:40 -0000 Hi, I'm looking for a ionice equivalent for FreeBSD. Let suppose that I setup a NAS using FreeBSD. I can substain 50MiB/s writing. Let suppose that I have a 720p security camera, writing at 2 MiB/s in a file. Then I have 10 users copying files around. All of this activity (camera + users) through Samba, so each connection has a dedicated process. Problem is that I want to give camera's maximal priority to guarantee smooth recording. I don't expect Samba to use much CPU, 99% should be spent in IO. So if I set the nice value of camera's process to Real-Time, it should do much, because its process will be on wait status most of the time. Consequently, when some IO requests coming from camera's process are in the queue, I want them to have top priority compared to requests coming from other processes. As the camera is limited to 2MiB/s, I expect the system to remain responsive. I know that seeks may lower the speed of the HDD, but as the HDD is slowing down, completing requests, I expect the number of camera IO requests to increase in the queue, and to be packed together, hopefully, stabilizing the number of seeks. BTW, I would use "root preexec" setting of Samba to execute a shell script for each new connection, giving best priority to the process if the user is "camera". Any idea? Thanks Laurent Debacker