OpenVZ Forum


Home » General » Support » Scaling UBC values: Why?
Scaling UBC values: Why? [message #37310] Wed, 02 September 2009 14:14 Go to next message
divB is currently offline  divB
Messages: 79
Registered: April 2009
Member
[quote src="http://wiki.openvz.org/UBC_derived_configuration_examples"]Caution: do not subtract the values of one configuration from others.[/quote]

Why not? I found this warning on many locations.

Also it seems to me that man should only scale configurations with the forumla in http://wiki.openvz.org/Intermediate_UBC_configurations and never add/subtract values.

Why not?

Regards,
divB
Re: Scaling UBC values: Why? [message #37357 is a reply to message #37310] Fri, 04 September 2009 12:54 Go to previous messageGo to next message
maratrus is currently offline  maratrus
Messages: 1495
Registered: August 2007
Location: Moscow
Senior Member
Hi,

all UBC configuration parameters should obey the consistency rules which are described at the page
http://wiki.openvz.org/UBC_consistency_check

It's just a simple math exercise
For example
Let's assume that there are exist two configuration examples.
Each of them should obey the inequalities that are described in a page mentioned above i.e.

privvmpages_1_bar >= vmguarpages_1_bar
privvmpages_2_bar >= vmguarpages_2_bar


If
privvmpages_3_bar = a_1*privvmpages_1_bar + a_2*privvmpages_2_bar
vmguarpages_3_bar = a_1*vmguarpages_1_bar + a_2*vmguarpages_2_bar
a_1 + a_2 = 1, a_1 >= 0, a_2 >= 0


then the consistency rule is still being held
 
privvmpages_3_bar >= vmguarpages_3_bar

So, the third configuration which is obtained as

[THIRD_CONFIGURATION] = a_1*[FIRST_CONFIGURATION] + a_2*[SECOND_CONFIGURATION]
a_1>=0, a_2>=0, a_1 + a_2 = 1

obey the consistency rule.

Consider another rule
tcprcvbuf_1_bar >= 64
tcprcv)buf_2_bar >= 64

So, the third configuration which is obtained as

[THIRD_CONFIGURATION] = a_1*[FIRST_CONFIGURATION] + a_2*[SECOND_CONFIGURATION]
a_1>=0, a_2>=0, a_1 + a_2 = 1


should obtain this rule too
tcprcvbuf_3_bar = a_1*tcprcvbuf_1_bar + a_2*tcprcv)buf_2_bar >= a_1*64 + a_2*64 = 64*(a_1 + a_2) = 64

because a_1 + a_2 = 1.

But subtraction doesn't guarantee that all rules are preserved.
Example

5 > 3, 4 > 1 but (5 - 4) < (3 - 1) because 1 < 2

Re: Scaling UBC values: Why? [message #37375 is a reply to message #37357] Fri, 04 September 2009 17:23 Go to previous message
divB is currently offline  divB
Messages: 79
Registered: April 2009
Member
Oh, thank you very much, now that's clear.

That means that I can also add/subtract specific values if I run vzcfgvalidate afterwards?

Regards,
divB
Previous Topic: Random networkcard names (eth0/eth1)?
Next Topic: XFS project quota (prjquota)
Goto Forum:
  


Current Time: Fri Nov 01 02:56:01 GMT 2024

Total time taken to generate the page: 0.03987 seconds