OpenVZ Forum


Home » General » Support » *SUGGESTION* Restructuring and Improving CONF files
icon10.gif  *SUGGESTION* Restructuring and Improving CONF files [message #13798] Tue, 05 June 2007 13:54 Go to next message
mperkel is currently offline  mperkel
Messages: 253
Registered: December 2006
Senior Member
OK - I have several suggestions here. Some is for developers and some for some of us (who program better than me) to write scripts. I find the conf files very confusing. If I dedicated my like to the internals of OpenVZ I'm sure they are quite clear. But for me to learn something new I have to forget something to make room for it. So - my suggestions.

Forst, instead of setting in bytes or even worse 4k pages, why not K,M and G for kilobytes, megabytes,and gigabytes? Thus instead of 4k pages - 512 megs of ram is:

old 125000
new 512m

Having said that I would also have the ability to not specify anything and have the system compute a logical default value based on formulas for values not specified or set to zero. Let the computer do the figuring.

Now for the second part.

I'd like to see someone build a PHP or JAVA web page to analize and help you generate conf files, specifically relating to all the numbers. You would have a window (text area) to paste your conf file into and hit submit. It will break it down and not only see if it'd correct, but analyze it showing how your setting compare to typical values. Perhaps even allowing you to start with templates called "huge" big" "medium" "small" and "tiny" and perhaps explanation in popup help windows that tell you what kind of things you might run in each.

There also might be a place to paste in your bean counters so that it can give you some percentages and suggest things that might be increased or decreased. It will also translate your config into human readable form so that you have text that explains exactly what your setting means in plain language.

Finally the output can be cut and pasted off the web page to you can copy the config to your server. I would have an option to generate it with comments so they output has a detailed explanation in the config file as to what each setting means.

So - who wants to code something up?


[Updated on: Wed, 06 June 2007 11:13] by Moderator

Report message to a moderator

Re: Restructuring and Improving CONF files [message #13808 is a reply to message #13798] Wed, 06 June 2007 03:53 Go to previous messageGo to next message
kingneutron is currently offline  kingneutron
Messages: 30
Registered: May 2007
Location: NE IL, USA
Member
// Likes ur ideas Cool

// lacks coding skillz for this Sad
Re: Restructuring and Improving CONF files [message #13814 is a reply to message #13798] Wed, 06 June 2007 10:07 Go to previous messageGo to next message
rickb is currently offline  rickb
Messages: 368
Registered: October 2006
Senior Member
Hi. I have you used the vzsplit and vzcfgvalidate tools? They accomplish exactly what you are looking for, and do not require another operating system, java, or anything other then a shell.

As for converting UBC memory metrics from pages to MBytes, it is unnecessary as both numbers are the same value with a different unit, right? Its unrealistic for an architecture to change config file format without a technical reason.

1 kilobyte = 1 * 2^10 byte
1 page = 4 * 2^10 byte
1 megabyte = 1 * 2^20 byte
1 gigabyte = 1 * 2^30 byte

I suppose if you want to read your configs in a unit other then pages, you could write a simple wrapper script to read your config, and convert metrics in pages (vmguar, oomguar, privvm, etc) to megs or whatever you prefer, and print it out for display.





-------------
Common Terms I post with: http://wiki.openvz.org/Category:Definitions

UBC. Learn it, love it, live it: http://wiki.openvz.org/Proc/user_beancounters
Re: Restructuring and Improving CONF files [message #13817 is a reply to message #13798] Wed, 06 June 2007 10:39 Go to previous messageGo to next message
Vasily Tarasov is currently offline  Vasily Tarasov
Messages: 1345
Registered: January 2006
Senior Member
Hello,

you wrote:
Quote:

First, instead of setting in bytes or even worse 4k pages, why not K,M and G for kilobytes, megabytes,and gigabytes? Thus instead of 4k pages - 512 megs of ram is.
Sorry, but I don't think that it is a good reason to change config file syntax because it confuses you Wink For me it's more clear and convenient to see the values there in bytes and in pages, and, I guess, I'm not alone Smile I strongly believe, it is a duty of some more high level tools to display settings in config file in various ways, which certain users prefer. BTW, vzlist can help you in it:
# expr `vzlist -Ho kmemsize.l 4` / 1024
5461
This is the kmemsize limit for VE 4 in kilobytes.

you wrote:
Quote:

Having said that I would also have the ability to not specify anything and have the system compute a logical default value based on formulas for values not specified or set to zero. Let the computer do the figuring.
Hmmm... At the moment after creating of VE you should not set any values - they are set by default. Then, assume, you run some application in this VE and it fails, because some limit is hit. But OpenVZ doesn't know, is it expected (administrator have set reasonable limit and somebody tries to overpass it), or the system is misconfigured! So I guess it's impossible (or very hard) to "let the computer do the figuring". BTW, in Virtuozzo (commercial OpenVZ) there is SLM technology, that replaces UBC and greatly simplifies resources limitation. You can read about it at SWSoft website.

HTH,
Vasily.
Re: Restructuring and Improving CONF files [message #13840 is a reply to message #13817] Wed, 06 June 2007 13:47 Go to previous messageGo to next message
kingneutron is currently offline  kingneutron
Messages: 30
Registered: May 2007
Location: NE IL, USA
Member
> Sorry, but I don't think that it is a good reason to change config file syntax because it confuses you

--For the record, I'm with the OP. Having "confusing" (read: NON-STANDARD) values -- espec. for common things like RAM alloc -- in a config file could limit openvz adoption by Teh Unwashed Masses.

--A config file should be easily understood by those who might have to edit it. (Not just OVZ developers!)

--Besides, there doesn't seem to be much of a reason to fine-grain memory alloc to multiples of pages; pretty much everybody uses MB and related units. Even *BSD realized this some time ago, and fixed their ' df ' display to a human-graspable format instead of making the end-user multiply everything by 2 to get KB instead of 512-sectors.

Rolling Eyes
Re: Restructuring and Improving CONF files [message #14008 is a reply to message #13840] Sun, 10 June 2007 03:59 Go to previous message
kingneutron is currently offline  kingneutron
Messages: 30
Registered: May 2007
Location: NE IL, USA
Member
See also ("Rationale" section):

https://wiki.ubuntu.com/install.exe
Previous Topic: *RESOLVED* template generation
Next Topic: Private virtual network with multiple VPN and NAT
Goto Forum:
  


Current Time: Wed Nov 06 03:07:51 GMT 2024

Total time taken to generate the page: 0.03413 seconds