<div>Hi Kuo,</div><div><br></div>One option would be to keep the usage information (num files, num bytes, etc) per container / account in an sqlite DB, just like it is done for account and container info.<div><br></div><div>

To avoid having to loop through all data at regular intervals (to update the info), additional logic could be added to the api methods to update the sqlite DB's when new files are added, files are deleted, etc. Such approach will require more lines of code, but will be far less stressful on performance.</div>

<div><br></div><div>(the brute-force approach to loop through it at regular intervals will be hell on performance on large deployments..)</div><div><br></div><div><br></div><div>For data transfer billing based on download / upload amounts, a similar approach could be used.</div>

<div><br></div><div>If no one else is looking into this, I would certainly be willing to help to help get this started.</div><div><br></div><div><br clear="all">Kind regards,<div>Frederik Van Hecke</div><div><br></div><div>

<font color="#999999"><b>T:</b>  +32487733713</font></div><div><font color="#999999"><b>E:</b>  <a href="mailto:frederik@cluttr.be" target="_blank">frederik@cluttr.be</a></font></div><div><font color="#999999"><b>W:</b> <a href="http://www.cluttr.be" target="_blank">www.cluttr.be</a></font></div>

<div><br></div><div><img src="http://cluttr.be/logo.mail.png"></div><div><br></div><div><br></div><div><span style="color:rgb(34,34,34);font-family:arial,sans-serif;background-color:rgb(255,255,255)"><pre style="white-space:pre-wrap">

<font color="#999999"><i>This e-mail and any attachments thereto may contain information which is confidential and/or protected by intellectual property rights and are intended for the sole use of the recipient(s)named above. Any use of the information contained herein (including, but not limited to, total or partial reproduction, communication or distribution in any form) by persons other than the designated recipient(s) is prohibited. If you have received this e-mail in error, please notify the sender either by telephone or by e-mail and delete the material from any computer. Thank you for your cooperation.</i></font></pre>

</span></div><br>
<br><br><div class="gmail_quote">On Thu, Apr 12, 2012 at 17:45, Kuo Hugo <span dir="ltr"><<a href="mailto:tonytkdk@gmail.com">tonytkdk@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

Hi folks , <div><br></div><div>I'm thinking about the better approach to manage "an user" or "an account" space usage quota in swift.</div><div>Is  there any related blueprint or sub-project even an idea around ?</div>


<div>Any suggestion of benefits to be an external service or to be a middle-ware in swift-proxy ?</div><div><br></div><div>I'm concerning about such feature will reduce the performance of entire Swift environment. </div>


<div><br></div><div>Appreciate :></div><span class="HOEnZb"><font color="#888888"><div><br></div><div>  </div><div><div><br></div>-- <br><div>+Hugo Kuo+</div><div><a href="mailto:tonytkdk@gmail.com" target="_blank">tonytkdk@gmail.com<br>

</a></div><div><a href="mailto:tonytkdk@gmail.com" target="_blank">+</a>886 935004793</div>
<br>
</div>
</font></span><br>_______________________________________________<br>
Mailing list: <a href="https://launchpad.net/~openstack" target="_blank">https://launchpad.net/~openstack</a><br>
Post to     : <a href="mailto:openstack@lists.launchpad.net">openstack@lists.launchpad.net</a><br>
Unsubscribe : <a href="https://launchpad.net/~openstack" target="_blank">https://launchpad.net/~openstack</a><br>
More help   : <a href="https://help.launchpad.net/ListHelp" target="_blank">https://help.launchpad.net/ListHelp</a><br>
<br></blockquote></div><br></div>