public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Amit Gud <gud@eth.net>
To: Alan <alan@clueserver.org>
Cc: Pavel Machek <pavel@ucw.cz>,
	Horst von Brand <vonbrand@inf.utfsm.cl>,
	"Fao, Sean" <Sean.Fao@dynextechnologies.com>,
	linux-kernel@vger.kernel.org
Subject: Re: Elastic Quota File System (EQFS)
Date: Fri, 25 Jun 2004 23:05:27 +0530	[thread overview]
Message-ID: <40DC625F.3010403@eth.net> (raw)
In-Reply-To: <1088181893.6558.12.camel@zontar.fnordora.org>

Alan wrote:

>On Fri, 2004-06-25 at 09:25, Pavel Machek wrote:
>  
>
>>Hi!
>>
>>    
>>
>>>Case closed, anyway. It belongs in the kernel only if there is no
>>>reasonable way to do it in userspace.
>>>      
>>>
>>But... there's no reasonable way to do this in userspace.
>>
>>Two pieces of kernel support are needed:
>>
>>1) some way to indicate "this file is elastic" (okay perhaps xattrs
>>can do this already)
>>
>>and either
>>
>>2a) file selection/deletion in kernel
>>
>>or
>>
>>2b) assume that disk does not fill up faster than 1GB/sec, allways
>>keep 1GB free, make "deleting" daemon poll each second [ugly,
>>unreliable]
>>
>>or
>>
>>2c) just before returning -ENOSPC, synchronously tell userspace to
>>free space, and retry the operation.
>>
>>BTW 2c) would be also usefull for undelete. Unfortunately 2c looks
>>very complex, too; it might be easier to do 2a than 2c.
>>    
>>
>
>Why does the kernel have to get involved with file deletion?
>
>  
>
Involvement of the kernel depends on  how we are treating the elastic 
files:

    -   when files are made elastic, are we increasing the user's quota? 
if so kernel becomes neccessary for if
       -   elastic file is deleted: decrement the user's quota
       -   elastic file is chowned: do the needfull (decrement previous 
owners and increment new owners quota)
   
    -   when files are made elastic, we are just not accounting the file 
size for the user's quota. In this case I dont see any involvement of 
the kernel,  but will need some other hacks.


>All it needs is to run at sufficient privs.
>
>If you are overflowing drives that easily, it is time to buy a bigger
>drive.  It is not the time to start deleting stuff at random.  Data is
>usually put on a drive for a reason.  Having a human decide what to
>delete is *much* better than letting some automated process do it in
>background.
>
>  
>
Admin assigns quotas to the user with using some case studies, like he 
won't be allocating 500 Mb for a C language course students. We are 
trying to harness some user behavior here. I wish I had some Gartner or 
Forrestor figures to show you that how often _all_ the users use up 
their 100% quota at any given point of time. I'm assuming that this 
*does* happen very rarely and I also assume that my assumption is very 
close to correct. The point is their is some 'free' space available for 
the users who use up all their quotas. Of course this free space is 
likely to be someday fall short for the over-spilling users, but then 
its time to increase quotas of all the users, and its then admin's duty 
to look at this. Perhaps this could become a good indication for the 
admin for increasing the quota of all the users.

>This sounds like a hack to get around a badly designed system with too
>few resources.
>
>Windows has an option to delete files "that are not needed".  It tends
>to delete things that you wanted, but had not thought about in a while.
>
>This really strikes me as a bad idea.  It has lots of "special" things
>that programs will have to deal with for this particular case. 
>This makes things much more complex in userspace for a problem that
>needs to be dealt with in meatspace.
>
>  
>
I do believe that this system can be done in userspace, but it has its 
own flaws then. Suppose theres a daemon, call it eqfsd. It forks parent 
listens a char device, child watches the disk space usage. A kernel 
module reports the file deletes, chowns to the char device, parent does 
the needfull. Child 'periodically' checks that the threshold is not 
reached. Here what can be done is suppose a user can transfer data with  
say 5 Mbps speed to his account....then we can easily get the minimum 
time required to fill up the remaining free space. Child sleeps for this 
much time minus some value for safety.  i.e. child sleeps for: ( (D - 
Ui) / 5 ) - safety_value seconds.

I'm sure this gotta be slow and *will* slow down the system, so I still 
insist that this should be in kspace.

It cannot be denied that there _are_ applications for such a system that 
we already discussed and theres a class of users who will find the 
system useful.


AG


  reply	other threads:[~2004-06-25 17:35 UTC|newest]

Thread overview: 47+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-06-25 14:02 Elastic Quota File System (EQFS) Amit Gud
2004-06-25 14:23 ` Fao, Sean
2004-06-25 14:44 ` Horst von Brand
2004-06-25 16:25   ` Pavel Machek
2004-06-25 16:44     ` Alan
2004-06-25 17:35       ` Amit Gud [this message]
2004-06-25 20:22         ` Fao, Sean
2004-06-25 23:50           ` Kevin Fox
2004-06-26  4:03           ` Amit Gud
2004-06-26 21:36             ` Fao, Sean
2004-06-26 23:16               ` Stephen Wille Padnos
2004-06-27  1:44                 ` Fao, Sean
2004-06-28 13:43                 ` Rob Couto
2004-06-25 21:36         ` Pavel Machek
2004-06-25 17:07     ` Horst von Brand
2004-06-25 18:44       ` Amit Gud
2004-06-25 21:44       ` Pavel Machek
  -- strict thread matches above, loose matches on Subject: below --
2004-06-23 15:53 Amit Gud
2004-06-23 17:53 ` Mark Watts
     [not found]   ` <1088016048.15211.10.camel@sage.kitchen>
2004-06-24  9:28     ` Amit Gud
2004-06-24 11:50       ` Olaf Dabrunz
2004-06-24 14:04         ` Sam Elstob
2004-06-24 13:51           ` Olaf Dabrunz
2004-06-24 14:17         ` Pavel Machek
2004-06-24 19:58           ` Fao, Sean
2004-06-24 20:28             ` Timothy Miller
2004-06-24 20:30             ` Timothy Miller
2004-06-24 21:30             ` Pavel Machek
2004-06-24 20:51               ` alan
2004-06-24 22:03                 ` Pavel Machek
2004-06-24 23:07                   ` alan
2004-06-25  0:15                     ` Pavel Machek
2004-06-25 11:57                       ` Fao, Sean
2004-06-25 12:07                       ` Josh Boyer
2004-06-25 19:34                         ` Jörn Engel
2004-06-25 17:37                       ` Timothy Miller
2004-06-25 18:44                         ` Amit Gud
2004-06-26 12:00                           ` Helge Hafting
2004-06-25 19:09                         ` Amit Gud
2004-06-30 13:02                         ` Olaf Dabrunz
2004-06-25  7:52                   ` Lionel Bouton
2004-06-27 18:18                     ` V13
2004-06-27 19:42                       ` Lionel Bouton
2004-06-28 15:34                         ` Amit Gud
2004-06-25  3:04       ` Bernd Eckenfels
2004-06-23 20:37 ` Rik van Riel
2004-06-23 15:48 gud

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=40DC625F.3010403@eth.net \
    --to=gud@eth.net \
    --cc=Sean.Fao@dynextechnologies.com \
    --cc=alan@clueserver.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pavel@ucw.cz \
    --cc=vonbrand@inf.utfsm.cl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox