From owner-freebsd-questions@FreeBSD.ORG Tue Jul 27 19:30:18 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 1C86A1065673 for ; Tue, 27 Jul 2010 19:30:18 +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 9F1788FC1C for ; Tue, 27 Jul 2010 19:30:17 +0000 (UTC) Received: by fxm13 with SMTP id 13so887889fxm.13 for ; Tue, 27 Jul 2010 12:30:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:received:in-reply-to :references:from:date:message-id:subject:to:cc:content-type; bh=xJvmsKBRWKNGdtsjVas0xvJo0lOoEhtLP0SHkopHqMI=; b=EGz7pbfe9pAkI6cZxG3qYS1T6amn609kFS2wg9+DKn0S6mA7LARKQkoELj7MFFTvrW t3IjbHOCi0TCtPyGy5rHW4fE7aA6/wXqKvWuvgAoWiPrPUc2ku9Dpy/CEM9x9Crs9RfM Y3c53FQnnxS8hdGeIXmP1FkOo3qqZc6vR3UDY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; b=opg7rLv/SzATmk3ssREm8kYeib+MhKal+x9yFWLX/VzMrydxX5kXP+3Mss3+ictMY4 dvHYWaqFDL3rjQybW3yN7LsaXccWl84MyJ9wJ4su0MimB5XFJ648fJaBp7eLq9M1JGW2 rmj0L8sOj1DS9W6lTlVwk2H+q4ChdQSSdsfoc= Received: by 10.223.115.201 with SMTP id j9mr8630625faq.48.1280259016201; Tue, 27 Jul 2010 12:30:16 -0700 (PDT) MIME-Version: 1.0 Received: by 10.223.115.193 with HTTP; Tue, 27 Jul 2010 12:29:56 -0700 (PDT) In-Reply-To: References: From: Debacker Date: Tue, 27 Jul 2010 21:29:56 +0200 Message-ID: To: Andrew Gould Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 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:30:18 -0000 Of course, just like you could put real-time processes in one CPU, and normal processes on another to avoid implement complex algorithms. While your solution is pragmatic, I would like to know if there are "clean" ways to do it. If not, this would be a documented use case to why would anyone actually need an I/O scheduler. Laurent On Tue, Jul 27, 2010 at 9:23 PM, Andrew Gould wrote: > 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 >