From the results collected we can deduce that in general the time spent per instruc- tion stays in the same order of magnitude both when non-essential (overhead) instructions are removed as well as when the problem size is increased. Overall, there is an approximately linear relation between the page generation time and the amount of instructions executed to generate a page. For the applications that have been surveyed, removal of non-essential instructions has an immediate ap- proximately linear impact on performance.
Tables 2.1 and 2.2 show the number of non-essential instructions that are ex- ecuted for each essential instruction for the Discus and RUBBoS/RUBiS experi- ments respectively. The overhead varies greatly from page to page. In the ma- jority of cases however, the overhead is significant: more than 20 non-essential instructions are executed for each essential instruction. An overhead of a factor 20.
In the Discus experiments we observe a trend that as the data set size increases, the overhead increases as well. Put differently, the overhead expands when the
2.5. Energy Consumption 31 Ratio 20/page Small 14.92 Medium 23.26 Large 41.67 40/page Small 22.72 Medium 30.30 Large 45.45 100/page Small 43.48 Medium 38.46 Large 47.62 Indiv. View Small 4.69 Medium 6.17 Large 18.52
Table 2.1: Displayed is the ratio of non-essential instructions executed for each essential instruction. Ratio RUBBoS, BrowseStByCat. 1.56 RUBBoS, ViewComments. 14.29 RUBBoS, ViewStory. 21.28 RUBBoS, StoriesOfTheDay. 25.64 RUBiS, SearchItByCat. 4.4 RUBiS, ViewBidHistory 11.83 RUBiS, ViewItem-qty-0 17.54 RUBiS, ViewItem-qty-5 80.64 RUBiS, ViewUserInfo 32.26
Table 2.2: Displayed is the ratio of non-essential instructions executed for each essential instruction.
same code is ran on a larger data set. It is very well possible that this increase in overhead is caused by the data reformatting done in the CakePHP framework. This happens when the result set received from the DBMS is formatted into an array that can be used for further processing by CakePHP framework objects. The fact that the overhead of the MySQL and SQL API categories increases linearly with the data size and thus stays constant per row also indicates that the cause of this increase in overhead should be sought in the CakePHP framework. From this result it can be expected that in this case the reduction in non-essential instructions will be larger as the data set size increases.
We showed a significant reduction in MIPS to be executed by a factor of 10. However, if we look at the ratio of time per essential instruction versus the average time per non-essential instruction (instruction time delay) for the web applications we have surveyed (Table 2.3), we observe that for most cases the average time per essential instruction is larger than the average time per non-essential instruction. A possible explanation for this is that the majority of essential instructions are ex- pected to be carrying out memory access or disk I/O. As a result, when estimating
ITD RUBBoS, BrowseStByCat. 0.42 RUBBoS, ViewComments. 0.84 RUBBoS, ViewStory. 0.90 RUBBoS, StoriesOfTheDay. 1.55 RUBiS, SearchItByCat. 0.91 RUBiS, ViewBidHistory 0.91 RUBiS, ViewItem-qty-0 1.16 RUBiS, ViewItem-qty-5 3.63 RUBiS, ViewUserInfo 1.43
Discus20/page, Medium 1.42
Discus40/page, Medium 1.30
Discus100/page, Medium 1.15
DiscusIndiv. View, Medium 1.03
Table 2.3: The Instruction Time Delay (ITD) is shown, which is the ratio of the average time per essential instruction against the average time per non-essential instruction. The latter is the weighted average of the time per instruction of the different overhead categories.
energy reduction this has to be taken into account, see below. In case of RUBBoS and RUBiS, this trend is not always visible. Possibly, this is because the time spent by the essential instructions is quite small, due to small transfers of data, so that these do not weigh up to the time spent by the non-essential instructions.
Table 2.4 displays the instruction time delay for Discus experiments with vary- ing data set sizes. For all cases, the time delay increases as the data set size in- creases. Or, as non-essential instructions are eliminated the essential instructions responsible for fetching the data from memory will take more time to execute. The memory wall becomes more exposed as overhead is removed. Recall from Table 2.1 that the number of overhead instructions increases with the data set size, however, the instruction time delay increases as well and this will counteract the increase in overhead.
When we consider the majority of the essential instructions to be carrying out memory access or disk I/O, we have to consider the cost of such data accesses in our conservative estimates of impact on energy usage. We use the component peak powers and actual peak power, which is 60% of the advertised peak power, of a typical server described by [33]. In the very worst case, essential instructions are the most expensive in energy usage and non-essential the cheapest, the re- moval of overhead would then only remove the cheap instructions. If we take the typical machine’s actual peak power usage of just the CPU and memory for the essential instructions and the idle power usage (estimated at 45% of actual peak power) for the CPU and memory for the non-essential instructions, we obtain a ratio of approximately69.6W : 31.3W or a factor2.22. LetdP be this factor2.22,
dT be the average time per essential instruction versus the average time per non- essential instruction (or time delay), reported in Table 2.4, andRbe the ratio of non-essential versus essential instructions, reported in Table 2.1. Then, we can use the formula
2.5. Energy Consumption 33 ITD 20/page Small 1.24 Medium 1.42 Large 1.50 40/page Small 1.18 Medium 1.30 Large 1.45 100/page Small 0.55 Medium 1.15 Large 1.46 Indiv. View Small 0.91 Medium 1.03 Large 1.25
Table 2.4: The Instruction Time Delay (ITD) is shown, similar to Table 2.3, but for Discus experiments with varying data set sizes.
1−dT×dP
R+ 1
×100%
to get a worst-case estimate of the energy saving. Completing this formula for
dP = 2.22, dT = 1.45, R = 45.45 gives an estimated energy saving of 93.1%. A little more realistic, we can estimate the energy saving considering the entire machine by taking the idle power usage of the entire machine for non-essential instructions and a peak energy usage of 90% of actual peak power usage of the entire machine for the essential instructions. This results in adP of2.0. When we complete the formula with thisdP, we get a slightly higher energy saving estimate of93.8%.
Our expected energy saving is based on the observation that essential instruc- tions are more expensive than non-essential instructions, because essential in- structions are more frequently instructions that access data in memory and disk I/O. Benchmarks with typical servers show that power usage of such servers is between 60% and 80% of actual peak power [33]. If we consider essential instruc- tions to use 80% of actual peak power and non-essential instructions to use 60%, we obtain adP of1.33. With the same parameters fordT andR, we estimate an energy saving of95.8%.
If we do not make a distinction in energy used per instruction for essential and non-essential instructions, we can compare the obtained numbers with the estimated energy saving This is reflected in the following formula:
1− dT
R+ 1
×100%
Completing fordT = 1.45, R = 45.45 results in an estimated energy reduction of 96.9%. This is higher than the expected saving, because we do not consider essential instructions to be more expensive.
Table 2.5 lists the estimated energy savings for the various Discus experiments. We note that the energy savings increase corresponds to an increase in data set
Estimated Energy Saving 20/page Small 89.6% Medium 92.2% Large 95.3% 40/page Small 93.4% Medium 94.5% Large 95.8% 100/page Small 98.4% Medium 96.1% Large 96.0% Indiv. View Small 78.7% Medium 80.9% Large 91.5%
Table 2.5: Estimated Energy Saving using the expecteddP = 1.33,dT obtained from Table 2.4 andRfrom Table 2.1
Estimated Energy Saving RUBBoS, BrowseStByCat. 78.2% RUBBoS, ViewComments. 95.0% RUBBoS, ViewStory. 94.6% RUBBoS, StoriesOfTheDay. 92.3% RUBiS, SearchItByCat. 77.6% RUBiS, ViewBidHistory 90.6% RUBiS, ViewItem-qty-0 91.7% RUBiS, ViewItem-qty-5 94.1% RUBiS, ViewUserInfo 94.3%
Table 2.6: Estimated Energy Saving using the expecteddP = 1.33,dT obtained from Table 2.3. Values forRnot shown due to space constraints.
size. Even though the instruction time delay is increasing with the size of the data sets, we still observe an increase in energy saving. We conclude that the increase in overhead instructions superfluously counteracts the instruction time delay. This is due to the significant size of the overhead ratios. Consider for example Discus Index 20/page; where the number of overhead instructions doubles for each ex- pansion in data set size (Table 2.1), the instruction time delay only increases with a factor1.05to1.15(Table 2.4). Results obtained using the same formulas for the RUBBoS and RUBiS experiments are shown in Table 2.6.
In conclusion, the estimated lower bound on energy saving we have found in the experiments performed with Discus amounts to71%for the Individual View experiment with the small data set. This result correlates well with the page gen- eration times displayed in Figure 2.1, where approximately3/4of the page gener- ation time is eliminated when the overhead is removed. Similar results are found in the results of the RUBBoS and RUBiS benchmarks, with a lower bound of77.6%.