• No se han encontrado resultados

CONTENIDO N°16: OTRAS ACTUACIONES RELATIVAS A LA ENTRADA Y REGISTRO ART 218 A 226.

In document DERECHO PROCESAL PENAL II.- (página 45-47)

V ª UNIDAD: ENTRADA Y REGISTRO EN DIFERENTES TIPOS DE LUGARES

CONTENIDO N°16: OTRAS ACTUACIONES RELATIVAS A LA ENTRADA Y REGISTRO ART 218 A 226.

In Step1, as demonstrated in figure 6.3, a series of calculation will be performed. Firstly, Ratioi

sand Distanceis for each flavors and stages will be calculated according to Ratiois = memoryi s cpui s and Distance i s(0, 0) = q memoryi s 2 + cpui s 2

. In our scenario, the Ratioi

sand Distanceis

calculation results for Stage1, Stage2 and Stage3 are listed respectively in table 6.6, table 6.7

and table 6.8.

As demonstrated in figure 6.3, based on the calculated Ratioi

s and Distanceis(0, 0) listed

in table 6.6, 6.7 and 6.8, the smallest flavor(flavor has smallest Distancei

s(0, 0) value) among

median values of Ratioi

sis adopted for each Stages. In this scenario, the median ratio value for

Stage1, Stage2 and Stage3 are 1/2, 1/3 and 1/2. The smallest flavors with these median ratio

value for Stage1, Stage2 and Stage3 are f6, f3 and f6. The amount of instances for Stage1,

Stage2and Stage3are the minimum number of instances defined in SLA, which are 1 instance,

2 instances and 1 instance, as demonstrated in table 6.5. The benchmark results is demonstrated in table 6.9. F LAV OR1 f4 f5 f6 Ratioi 1 1/2 1/2 1/2 Distancei 1(0, 0) 6.7 4.5 2.2 Table 6.6. Ratioi

6.5. SCENARIO 113 F LAV OR2 f1 f2 f3 f4 Ratioi 2 1/4 1/3 1/3 1/2 Distancei 2(0, 0) 12.4 6.3 3.2 6.7 Table 6.7. Ratioi

2and Distancei2calculated in Step1 for Stage2.

F LAV OR3 f1 f2 f3 f4 f5 f6 f7 f8 f9 Ratioi 3 1/4 1/3 1/3 1/2 1/2 1/2 2 2 1 Distancei 3(0, 0) 12.4 6.3 3.2 6.7 4.5 2.2 11.2 6.7 1.4 Table 6.8. Ratioi

3and Distancei3calculated in Step1 for Stage3.

According to the algorithm of step2, which is demonstrated in figure 6.4, the memory and CPU resource utilization ( ReUtilmemory

s and ReUtilcpus ) for each stage Stagestogether with the

allocated amount of memory memorysand CPU cpus, the used amount of resources UsedRecpus

and UsedRememory

s can be calculated. An optimized resource ratio value OptimizedRatios is

derived from the used amount of resources UsedRecpu

s and UsedRememorys . This OptimizedRatios

will be used as the guideline for choosing the flavors for next SelfBench. The flavor with biggest Distancei

2(0, 0) will be chosen and a bigger flavor’ MFC will be get through benchmark.

Taking Stage2 for example, ReUtil memory

2 is 40% and ReUtil cpu

s ) is 30%. The allocated

amount of memory memorysis 3G and CPU cpusis 12. The used amount of CPU UsedRecpus

is 1.2 and UsedRememory

s is 3.6. The optimized resource ratio OptimizedRatio2 is 1.2/3.6 =

1/3. The flavor chosen for the SelfBench at the end of Step2 should be approximate to

OptimizedRatio2 = 1/3. According to table 6.12, flavor f2 and f3 both have a Ratioi2 of 1/3.

Flavor f2 is chosen for Stage2 in the next SelfBench because f2 has a bigger Distancei2(0, 0)

value than f3. Similarly, flavor f4 is chosen for Stage1and flavor f7 is chosen for Stage3.

Table 6.10 presents the SelfBench results of Step2. In our scenario, the SelfBench result ARmax is 200. The memory utilization ReU tilmemory

s and CPU utilization ReUtilscputogether

with allocated amount of memory memorysand CPU cpusindicate that the optimized amount

of memory mem and CPU cpu. The determination of mem and cpu takes 80% of resource uti- lization threshold into consideration. mem and cpu can be seen as the optimized configuration of flavor for serving request arrival rate ARmax = 200.

Taking Stage3for example, The memory utilization ReUtilsmemoryis 40% and CPU utiliza-

tion ReUtilcpu

s is also 40%. The allocated amount of memory memorysis 10G and CPU cpus

is 5. The resource utilization threshold for CPU and memory are both 80%. The optimized amount of memory mem is 5 gigabyte and CPU cpu is 5/2.

The SelfBench results of step2 will be used in step3 as the starting point of searching the configuration for getting the benchmarked MFC. Taking Stage3 for example, as demonstrated

in table 6.13, the minimum Distancei

3(5, 5/2) value exceed the configurable threshold value

ε = 1. Therefore, the flavor for Stage3 in next configuration of SelfBench is the same as the

memorys cpus ReU tilsmemory ReU tilscpu U sedRememorys U sedRecpus OptimizedRatios

Stage1 1 2 80% 80% 0.8 1.6 1/2

Stage2 1 3 70% 70% 0.7 2.1 1/3

Stage3 1 2 80% 20% 0.8 0.4 2

114 CHAPTER 6. BENCHMARKING BASEDSLA FEASIBILITY STUDY

memorys cpus ReU tilmemorys ReU tilcpus mem cpu f lavorscurrent f lavors

Stage1 3 6 30% 30% 9/8 9/4 f4 f6

Stage2 2 6 80% 80% 2 6 f2 f2

Stage3 10 5 40% 40% 5 5/2 f7 f8

Table 6.10. Step2 SelfBench on one instance of f4 on Stage1, two instances of f2 on Stage2and one instance of

f7 on Stage3.ε = 1.5.ARmax= 200. F LAV OR1 f4 f5 f6 Distancei 1(9/8, 9/4) 4.2 2 0.28 Distancei 1(0, 0) 6.7 4.5 2.2

Table 6.11. Better tailored flavor exploring for Stage1in Step3.

current one which is flavor f6.

Similarly, referring to table 6.11 and table 6.12, flavor for Stage1is still flavor f6 and flavor

for Stage2 is still flavor f2. According to algorithm described in figure 6.5, the exploring of

better tailored flavors will be stopped because there is no change of flavors. Otherwise, the SelfBench will be continuous and the exploring will be performed from all over again, until there is no change of flavors on each stages.

At the end of Step3, one flavor for each stages will be achieved its MF Ci

s through bench-

mark. These benchmarked MF Ci

s will be used to extrapolate the MF Csi of smaller flavors.

The benchmarks for bigger flavors in step5 will be established based on these benchmarked M F Ci

stoo. The linear estimation factor is ksi. kisis derived by comparing each flavors with the

saturated flavor for each Stagesseparately. As described in figure 6.6, ksi is the minimum ratio

between the ratio of CPU and the ratio of memory. The ratio of CPU is derived by comparing the configured amount of CPU to the saturated flavor used in the last SelfBench in Step3. The ratio of memory is derived in the same way. As demonstrated in table 6.14, taking flavor f1 used on stage Stage2for example, flavor

1

2 has 12 vCPU and 3 gigabyte of memory. The flavor used

on stage Stage2 in the last SelfBench of Step3 is flavor f2, which has 6 vCPU and 2 gigabyte

of memory. Therefore, the ratio of CPU is 2 and the ratio of memory is 1.5. k1

2, the linear

factor of flavor1

2, is 1.5. Other linear factors kisare calculated in the same way and are listed in

table 6.14.

The linear factor ki

s will be used in step4 to get the MFC for flavors has a kislower than or

equal to 1. Taking flavor f3 on stage Stage2 for example, k32 is 0.5 and the benchmarked MFC

is 100, therefore MF C3 2 = k

3

2 ∗ 100 is 50. Flavor f6 for stage Stage1, flavor f2, f3, f4 for stage

Stage2 and flavor f3, f6, f9 for stage Stage3 have a ksi lower than or equal to 1. Their MF Csi

can be derived similarly and are listed in table 6.15.

Flavor f4 and f5 for stage Stage1, flavor f1 for stage Stage2 and flavor f1, f2, f4, f5, f7, f8

for stage Stage3have ksi bigger than 1.

As depicted in figure 6.10, their MF Ci

scan not be derived only based on previous bench-

F LAV OR2 f1 f2 f3 f4

Distancei

2(2, 6) 6.1 0 3.2 1

Distancei

2(0, 0) 12.4 6.3 3.2 6.7

6.5. SCENARIO 115 F LAV OR3 f1 f2 f3 f4 f5 f6 f7 f8 f9 Distancei 3(5, 5/2) 9.7 4.6 4 4 3.4 4 5.6 1.1 4.3 Distancei 3(0, 0) 12.4 6.3 3.2 6.7 4.5 2.2 11.2 6.7 1.4

Table 6.13. Better tailored flavor exploring for Stage3in Step3.

ki

s f1 f2 f3 f4 f5 f6 f7 f8 f9

Stage1 3 2 1

Stage2 1.5 1 0.5 1

Stage3 1/2 1/3 1/6 1/2 1/3 1/6 5/3 1 1/6

Table 6.14. Linear extrapolation factor ki

sin step4. M F Ci s f1 f2 f3 f4 f5 f6 f7 f8 f9 Stage1 ? ? 200 Stage2 ? 100 50 100 Stage3 100 67 33 100 67 33 ? 200 33 Table 6.15. Step4: MF C1= 200,M F C2= 100,M F C3= 200. 0 Unknown real MFC Linear estimated MFC ksi MFC s i Benchmarked MFC Under-estimation of MFC Over-estimation of MFC

116 CHAPTER 6. BENCHMARKING BASEDSLA FEASIBILITY STUDY

M F Ci

s f1 f2 f3 f4 f5 f6 f7 f8 f9

Stage1 500 350 200

Table 6.16. Step5: SelfBench on 1 instance of f4 on Stage1, 6 instances of f2 on Stage2and 3 instances of f6 on

Stage3.ε = 1.ARmax= 500. Therefore, MF C 4 1 = 500.

0 500

200

Linear estimated based on SelfBench in step3 Linear estimated based on SelfBench in step5

350 1 2 3 (1, 200) (2, 350) (3, 500) k 1 i MFC 1 i

Figure 6.11. Linear estimation for Stage1

marks. At least the benchmarks fully using the flavor with biggest linear factor ki

s are needed

to extrapolate rest of the MF Ci

s. The linear estimation based on factor ksi and previous Self-

Bench results will lead to over estimation of MF Ci

sof flavors with ksi bigger than 1. However,

these over estimated MF Ci

s give us the upper-bound of real MF Csi and we can establish new

SelfBench accordingly.

Taking stage Stage1 for example, flavor f4 has the biggest k1i which is 3. Therefore, the

biggest flavor is f4 and the MF C4

1 is at most 3 ∗ 200 = 600. To get flavor f4 saturated on stage

Stage1, other stages Stage2 and Stage3 only need to configure enough resources for serving

600 request/s. In step5, we will perform SelfBench on 1 instance of flavor f4 on Stage1 , 6

instances of flavor f2 on Stage2 and 3 instances of flavor f6 on Stage3. The SelfBench result

show that the maximum capable arrival rate is 500 request per second. Therefore, MF C4 1 =

500.

As demonstrated in figure 6.11, MF C5

1 can be linear estimated according to the algorithm

depicted in figure 6.7. After this SelfBench in step5, all MF Ci

1for stage Stage1 are known as

listed in table 6.16.

Flavor f1 for Stage2 and flavor f4 for stage Stage3 can be benchmarked similarly. As

demonstrated in figure 6.12 and 6.13, the MF Ci

s for the rest of flavors on each stage can be

derived as listed in table 6.17 and table 6.18.

Until now, as summarized and listed in table 6.19, we have the all the MF Ci

sfor all stages

6.5. SCENARIO 117

0 130

50

Linear estimated based on SelfBench in step3 Linear estimated based on SelfBench in step5

100 1 2 3 (1, 50) (2, 100) (3, 130) k 2 i MFC 2 i

Figure 6.12. Linear estimation for Stage2

0 500

200

Linear estimated based on SelfBench in step3 Linear estimated based on SelfBench in step5

350 1 2 3 (1, 200) (2, 380) (3, 560) k3i MFCi3 0.5 1.5 2.5 (0.5, 100) (1.5, 290) (2, 470)

Figure 6.13. Linear estimation for Stage3

M F Ci

s f1 f2 f3 f4 f5 f6 f7 f8 f9

Stage2 130 100 50 100

Table 6.17. Step5: SelfBench on 2 instances of f6 on Stage1, 2 instances of f1 on Stage2and 2 instances of f6

on Stage3.ε = 1.ARmax= 260. Therefore, MF C 1 2 = 130.

118 CHAPTER 6. BENCHMARKING BASEDSLA FEASIBILITY STUDY

M F Ci

s f1 f2 f3 f4 f5 f6 f7 f8 f9

Stage3 100 67 33 100 67 33 270 200 33

Table 6.18. Step5: SelfBench on 2 instances of f6 on Stage1, 4 instances of f2 on Stage2and 1 instance of f7 on

Stage3.ε = 1.5.ARmax= 270. Therefore, MF C 7 3 = 270. M F Ci s f1 f2 f3 f4 f5 f6 f7 f8 f9 Stage1 500 350 200 Stage2 130 100 50 100 Stage3 100 67 33 100 67 33 270 200 33 Table 6.19. Final MF Ci s

in figure 6.8 and figure 6.9 can be performed according to table 6.19.

In document DERECHO PROCESAL PENAL II.- (página 45-47)

Documento similar