From owner-freebsd-questions@FreeBSD.ORG Tue Jul 27 19:23: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 86D1C1065675 for ; Tue, 27 Jul 2010 19:23:40 +0000 (UTC) (envelope-from andrewlylegould@gmail.com) Received: from mail-yw0-f54.google.com (mail-yw0-f54.google.com [209.85.213.54]) by mx1.freebsd.org (Postfix) with ESMTP id 432358FC16 for ; Tue, 27 Jul 2010 19:23:39 +0000 (UTC) Received: by ywf9 with SMTP id 9so761097ywf.13 for ; Tue, 27 Jul 2010 12:23:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type; bh=JXOK2LgeYtXt6MaYCQgcWAmBjF/osb4y+8jTo2n47RU=; b=QG83Ti6kwcUqEouLqjoA/N6cPNKg7VHH+9J903h2TZbexn1vGxki/0eAQhPs9Mlm1f NnUGx6tzzFRp1ag8PeFYT7Fmij5UN6fZb/+ShoRmuInxMnvuaWVoARm8h7IkYl0DnXgn YIHa8HDWYsZuwVuUvir3IGRZdhgGKNr0XcLvk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=Pf68VKP+lg+UZE58TJ6bnwdd4YoekxlS+Ms9vk4hr/4G1R5X7IxLeM3ctYcAbmNf8Z TtmDAgCHlkI+ALkMLO24M8mM9Eb1cu5QCpWdwnOr2jBYrWROk7vJPuheds7/dB0Zjb9p kqS4dtBqRh3J6CVT4WCSSQ8Ii/zbyG0bcuEK0= MIME-Version: 1.0 Received: by 10.151.94.14 with SMTP id w14mr1460279ybl.68.1280258619432; Tue, 27 Jul 2010 12:23:39 -0700 (PDT) Received: by 10.231.15.73 with HTTP; Tue, 27 Jul 2010 12:23:39 -0700 (PDT) In-Reply-To: References: Date: Tue, 27 Jul 2010 14:23:39 -0500 Message-ID: From: Andrew Gould To: Debacker Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-questions@freebsd.org Subject: Re: 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:23:40 -0000 On Tue, Jul 27, 2010 at 1:45 PM, Debacker wrote: > 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 Would putting the camera's storage space on a separate HDD from the other users help? Andrew