OpenVZ Forum


Home » General » Support » Setting Disk Quota & Inodes.
Setting Disk Quota & Inodes. [message #27565] Tue, 19 February 2008 19:26 Go to next message
joelee is currently offline  joelee
Messages: 63
Registered: April 2006
Member
Hi All,

I'd like to know the relationship with setting the disk quota value and the value set for inodes. For example, if I setup my disk quota for 10G soft limit : 12G hard limit. What should the inodes be adjusted to? So, is there a formula used to adjust inodes based on the quota set for the HD?

Would appreciate any info that can clear this up for me!

Joe
Re: Setting Disk Quota & Inodes. [message #27585 is a reply to message #27565] Wed, 20 February 2008 07:40 Go to previous messageGo to next message
maratrus is currently offline  maratrus
Messages: 1495
Registered: August 2007
Location: Moscow
Senior Member
Hi,

I thought that there is no transparent connection between these two values. I've asked some people and they haven't known too.
Why do you think there is formula to adjust inodes based on the quota? Please if you know any additional information or some statistics based on your experience provide us with this information. Many thanks for your assistance!
Re: Setting Disk Quota & Inodes. [message #27588 is a reply to message #27565] Wed, 20 February 2008 07:51 Go to previous messageGo to next message
xemul is currently offline  xemul
Messages: 248
Registered: November 2005
Senior Member
There's no direct connection between disk limits and inode limits.

You may just evaluate these numbers. E.g. if you expect your files to be big, then the inodes limit may be set low; if you're going to create plenty of small files then the larger inodes limit will be required.


http://static.openvz.org/userbars/openvz-developer.png
Re: Setting Disk Quota & Inodes. [message #27610 is a reply to message #27588] Wed, 20 February 2008 18:06 Go to previous messageGo to next message
joelee is currently offline  joelee
Messages: 63
Registered: April 2006
Member
There's no direct connection between disk limits and inode limits.

You may just evaluate these numbers. E.g. if you expect your files to be big, then the inodes limit may be set low; if you're going to create plenty of small files then the larger inodes limit will be required.


Xemul, thanks for your comments above... However, I am wondering how are people evaluating what size files are going to eventually populate the server - Especially, like Web or DB type servers that are so variable. I don't see how one can predict this. I can understand for servers like dns, ntp, that are merely static in data.

So, from xemul comments above, i can set my disk space to any size with out considering how much inodes to give it. And, the other question is: does the default inode setting is it considered for small files, medium size files or large files? What is the baseline for the initial default inode settings?

Joe
Re: Setting Disk Quota & Inodes. [message #27622 is a reply to message #27565] Thu, 21 February 2008 08:21 Go to previous messageGo to next message
xemul is currently offline  xemul
Messages: 248
Registered: November 2005
Senior Member
Quote:

... how are people evaluating what size files are going to eventually populate the server ...


Well, they usually set them to something like MAX_HW_INODES/NUMBER_OF_VES and then increase/decrease them depending on the requirements.

Quote:

What is the baseline for the initial default inode settings?



These numbers came from testing. We just noticed how much inodes consumes an average web server (with Apache, Sendmail, MySQL, ect) and set them in default config files.


http://static.openvz.org/userbars/openvz-developer.png
Re: Setting Disk Quota & Inodes. [message #27644 is a reply to message #27622] Thu, 21 February 2008 14:42 Go to previous messageGo to next message
joelee is currently offline  joelee
Messages: 63
Registered: April 2006
Member
Xemul, again thanks for your comments below... I am not trying to beat this question to death but really trying to understand how users not to experience with OpenVZ should allocate the proper inodes.

These numbers came from testing. We just noticed how much inodes consumes an average web server (with Apache, Sendmail, MySQL, ect) and set them in default config files.


Per your above comments, the "defualt openz" inode settings and perhaps others where derived from testing average web server with apache, sendmail, sqldb, etc.

The question in my mind is:
"what is considered average", What is considered low vs high?

What are the performance impact (if any) with not properly setting the inodes?

Are there any command tools that can help set the proper inode settings? Or, Identify when inodes are not sufficiently set?

Once the inodes are set can they be changed/adjusted later - Same for disk space?

Joe

Re: Setting Disk Quota & Inodes. [message #27665 is a reply to message #27565] Fri, 22 February 2008 08:45 Go to previous messageGo to next message
xemul is currently offline  xemul
Messages: 248
Registered: November 2005
Senior Member
Quote:

"what is considered average", What is considered low vs high?


Average is the number of inodes that the typical server uses during its lifetime. There's not way to evaluate this number - only testing in real life.

Quote:

What are the performance impact (if any) with not properly setting the inodes?


No performance impact at all. You just won't be able to create more files by the time you hit the limit.

Quote:

Are there any command tools that can help set the proper inode settings? Or, Identify when inodes are not sufficiently set?


Currently we don't have such. I admit there are some third party monitors that watch the inode's limits hits, but I can't provide you the links Sad VE owners usually complain, that some soft refuses to work and investigation show, that it hits some limits (e.g. quota's) and HN administrator may in this case increase the limits.

Quote:

Once the inodes are set can they be changed/adjusted later - Same for disk space?


Sure! vzquota anr/or vzctl may help you with this.

See, these limits are invented to prevent DoS attacks from VE owners. If your HN is not very critical for this, you may safely set the limits to unlimited values and leave them for a couple of days. After this you may check how much resources of each kind each VE needs and tie the limits.


http://static.openvz.org/userbars/openvz-developer.png
Re: Setting Disk Quota & Inodes. [message #27698 is a reply to message #27665] Fri, 22 February 2008 19:49 Go to previous messageGo to next message
joelee is currently offline  joelee
Messages: 63
Registered: April 2006
Member
Xemul, thanks for your explanation! It is more clear for me now on the usage of inodes. I's like to try your suggestion to set the inodes unlimited and monitor the usage and then see about locking it to that... I would appreciate if you can share how to set inode to the unlimited way. And, what commands can I use to track the inodes usage? Sorry, for the dumb question as I am not that experience in linux - Yet!

Joe
Re: Setting Disk Quota & Inodes. [message #27750 is a reply to message #27565] Tue, 26 February 2008 08:09 Go to previous message
xemul is currently offline  xemul
Messages: 248
Registered: November 2005
Senior Member
Quote:

what commands can I use to track the inodes usage?


vzctl/vzquota

Quote:

how to set inode to the unlimited way


You may do the following. Run the
df -i
command and check how many inodes are available for the partition your /vz/directory is on. After this set all VEs' inodes to this value.


http://static.openvz.org/userbars/openvz-developer.png
Previous Topic: Networking Problem...
Next Topic: kernel oops plz help
Goto Forum:
  


Current Time: Sun Nov 27 19:49:58 GMT 2022

Total time taken to generate the page: 0.00919 seconds