<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Faishal Zharfan | UCSC OSPO</title><link>https://deploy-preview-1007--ucsc-ospo.netlify.app/author/faishal-zharfan/</link><atom:link href="https://deploy-preview-1007--ucsc-ospo.netlify.app/author/faishal-zharfan/index.xml" rel="self" type="application/rss+xml"/><description>Faishal Zharfan</description><generator>Wowchemy (https://wowchemy.com)</generator><language>en-us</language><image><url>https://deploy-preview-1007--ucsc-ospo.netlify.app/author/faishal-zharfan/avatar_hu03314607aeb9d8b0c4833924c4292311_188347_270x270_fill_q75_lanczos_center.jpeg</url><title>Faishal Zharfan</title><link>https://deploy-preview-1007--ucsc-ospo.netlify.app/author/faishal-zharfan/</link></image><item><title>Improving Video Applications' Accuracy by Enabling The Use of Concierge</title><link>https://deploy-preview-1007--ucsc-ospo.netlify.app/report/osre23/uchicago/edgebench/20230731-zharfanf/</link><pubDate>Mon, 31 Jul 2023 00:00:00 +0000</pubDate><guid>https://deploy-preview-1007--ucsc-ospo.netlify.app/report/osre23/uchicago/edgebench/20230731-zharfanf/</guid><description>&lt;style>
p {
text-align: justify;
}
img {
display: block;
margin-left: auto;
margin-right: auto;
}
&lt;/style>
&lt;h2 id="introduction">Introduction&lt;/h2>
&lt;p>Hello, it&amp;rsquo;s me again, Faishal, a SoR project contributor for the edgebench project. For the past these two months, my mentors and I have been working on improving the performance of our system. In this report, I would like to share with you what we have been working on.&lt;/p>
&lt;h2 id="motivation">Motivation&lt;/h2>
&lt;p>Edgebench is a project that focuses on how to efficiently distribute resource (bandwidth and cpu usage) across several video applications. Nowaday&amp;rsquo;s video applications process its data or video on a server or known as edge computing, hence bandwidth or compute unit may be the greatest concern if we talk about edge computing in terms of WAN, because it is strictly limited.&lt;/p>
&lt;p>Consider the following case, suppose we have 3 video applications running that is located in several areas across a city. Suppose the total bandwidth allocated to those 3 video applications is also fixed. Naively, we may divide the bandwidth evenly to every camera in the system. We may have the following graph of the allocated bandwidth overtime.&lt;/p>
&lt;p>
&lt;figure >
&lt;div class="d-flex justify-content-center">
&lt;div class="w-100" >&lt;img src="./images/baseline_alloc.png" alt="Baseline Allocation" loading="lazy" data-zoomable />&lt;/div>
&lt;/div>&lt;/figure>
&lt;/p>
&lt;p>They are fixed and won’t change. However, every video application has its own characteristic to deliver such a good result or f1-score. It is our task to maintain high average f1-score. Therefore we need to implement a new solution which is accuracy-oriented. The accuracy-gradient&lt;a href="%28#acc%29">[1]&lt;/a> comes into this.&lt;/p>
&lt;h2 id="system-design">System Design&lt;/h2>
&lt;p>On our current design, we need a resource allocator, namely concierge. This concierge determines how much bandwidth is needed for every video application (vap) in the system. Concierge will do the allocation at a certain time interval that has been determined before. This process is called profiling, on this process, the concierge will first ask every vap to calculate their f1-score at a certain video segment when the bandwidth is added by profile_delta. Then the difference of this f1-score is substracted by the default f1-score, namely &lt;code>f1_diff_high&lt;/code>. After that, the concierge will ask to reduce its bandwidth by profile_delta and do the same process as before, this result will be named &lt;code>f1_diff_low.&lt;/code> Those two results will be sent to the concierge for the next step. On the concierge, there will be sensitivity calculation, where sensitivity is&lt;/p>
&lt;!-- pada sistem yang kami desain, kami membutuhkan sebuah resource allocator yang kami namakan concierge. Concierge ini yang akan menentukan berapa besarnya bandwidth yang dibutuhkan pada tiap video application. Concierge akan melakukan penentuan bw dalam interval yang sudah ditentukan sebelumnya, pada tahap ini, concierge akan meminta kepada seluruh video aplikasi untuk menghitung f1-score pada segmen video tertentu ketika alokasi bandwidth pada aplikasi itu dinaikan sebesar delta yang sudah ditentukan pula. Setelah itu, the difference of f1-score disimpan pada variabel f1_diff_high. Lalu concierge akan meminta f1-score ketika bw akan diturunkan sebesar delta. Akan pula dihitung the difference-nya. Kedua hasil tersebut akan dikirimkan oleh video aplikasi kepada concierge untuk dilakukan perhitungan selanjutnya. -->
&lt;!-- Pada concierge, akan dilakukan perhitungan sensitivity. Where sensitivity -->
&lt;p>
&lt;figure >
&lt;div class="d-flex justify-content-center">
&lt;div class="w-100" >&lt;img src="https://latex.codecogs.com/svg.image?&amp;amp;space;sensitivity[i]=f1%5c_diff%5c_high[i]-%5cSigma_%7bk=1%7d%5enf1%5c_diff%5c_low[k];k%5cneq&amp;amp;space;i&amp;amp;space;" alt="sensitivity[i] = f1_diff_high[i] - \Sigma_{k=1}^nf1_diff_low[k]; k \neq i" loading="lazy" data-zoomable />&lt;/div>
&lt;/div>&lt;/figure>
&lt;/p>
&lt;p>This equation tells us which video application will give us the best f1-score improvement if we add more bandwidth to one vap while reducing other&amp;rsquo;s bandwidth. From this, we will optimize and the concierge will give the bandwdith to the one with the highest sensitivity and take the bandwidth from the app with the lowest sensitvity.&lt;/p>
&lt;h2 id="results">Results&lt;/h2>
&lt;p>As aforementioned, our main objective is to improve the accuracy. However, there are two parameters that will be taken into account which are improvement and the overhead of its improvement. We first choose 3 dds apps&lt;a href="#dds">[2]&lt;/a> that we think will be our ideal case. The following graphs show the profile of our ideal case&lt;/p>
&lt;p>
&lt;figure >
&lt;div class="d-flex justify-content-center">
&lt;div class="w-100" >&lt;img src="./images/ideal_case.png" alt="Ideal Case" loading="lazy" data-zoomable />&lt;/div>
&lt;/div>&lt;/figure>
&lt;/p>
&lt;p>We can see that two of them have high sensitivity especially on lower bandwidth and one of them has low sensitivity. This is a perfect scenario since we may sacrifice one&amp;rsquo;s bandwidth and give it to the app that has the highest sensitivity at that iteration. We will do the experiment under the following setup&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-shell" data-lang="shell">&lt;span class="line">&lt;span class="cl">&lt;span class="nv">DATASETS&lt;/span>&lt;span class="o">=(&lt;/span>&lt;span class="s2">&amp;#34;&amp;#34;&lt;/span> &lt;span class="s2">&amp;#34;uav-1&amp;#34;&lt;/span> &lt;span class="s2">&amp;#34;coldwater&amp;#34;&lt;/span> &lt;span class="s2">&amp;#34;roppongi&amp;#34;&lt;/span>&lt;span class="o">)&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="nv">MAX_BW&lt;/span>&lt;span class="o">=&lt;/span>&lt;span class="m">1200&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="nv">PROFILING_DELTA&lt;/span>&lt;span class="o">=&lt;/span>&lt;span class="m">80&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="nv">MI&lt;/span>&lt;span class="o">=&lt;/span>&lt;span class="m">5&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>That setup block tells us we will use the total bandwith of 1200 kbps, that means at first we will distribute the bandwidth evenly (400 kbps). The profiling_delta will be 80 kbps and profiling interval (&lt;code>MI&lt;/code>) will be 5 seconds.&lt;/p>
&lt;p>
&lt;figure >
&lt;div class="d-flex justify-content-center">
&lt;div class="w-100" >&lt;img src="./images/merged_ideal.png" alt="Merged Ideal" loading="lazy" data-zoomable />&lt;/div>
&lt;/div>&lt;/figure>
&lt;/p>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th style="text-align:center">&lt;strong>Mode&lt;/strong>&lt;/th>
&lt;th style="text-align:center">&lt;em>DDS&lt;/em> &lt;br> (&lt;span style="color:blue">&lt;em>uav-1&lt;/em>&lt;/span>)&lt;/th>
&lt;th style="text-align:center">&lt;em>DDS&lt;/em> &lt;br> (&lt;span style="color:orange">&lt;em>coldwater&lt;/em>&lt;/span>)&lt;/th>
&lt;th style="text-align:center">&lt;em>DDS&lt;/em> &lt;br> (&lt;span style="color:green">&lt;em>roppongi&lt;/em>&lt;/span>)&lt;/th>
&lt;th style="text-align:center">Average&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td style="text-align:center">Baseline&lt;/td>
&lt;td style="text-align:center">0.042&lt;/td>
&lt;td style="text-align:center">0.913&lt;/td>
&lt;td style="text-align:center">0.551&lt;/td>
&lt;td style="text-align:center">0.502&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td style="text-align:center">&lt;strong>Concierge&lt;/strong>&lt;/td>
&lt;td style="text-align:center">0.542&lt;/td>
&lt;td style="text-align:center">0.854&lt;/td>
&lt;td style="text-align:center">0.495&lt;/td>
&lt;td style="text-align:center">&lt;strong>0.63&lt;/strong> (&lt;span style="color:green">&lt;em>+25.5%&lt;/em>&lt;/span>)&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;p>From the result, we managed to improve the average f1-score by &lt;strong>0.1&lt;/strong> or &lt;strong>25.5%&lt;/strong>. This is obviously a very good result. There are a total of 10 videos in our dataset, for the next experiment, we first will generate 6 combinations of dds apps. Noted that for each combination, one video will be uav-1 since we know that it has the highest sensitivity. We will the experiment with 4 bandwidth scenarios &lt;strong>(1200, 1500, 1800, 2100)&lt;/strong> in kbps.&lt;/p>
&lt;!-- dari hasil tersebut, kita telah berhasil meng-improve rata-rata f1-score sebesar 0.1 atau 13.5% Hal ini tentu saja merupakan sebuah hasil yang sangat baik. Selanjutnya kami melakukan tes yang sama namun dengan video yang berbeda. setupnya demikian -->
&lt;p>
&lt;figure >
&lt;div class="d-flex justify-content-center">
&lt;div class="w-100" >&lt;img src="./images/only_uav_merged.png" alt="Only Uav-1" loading="lazy" data-zoomable />&lt;/div>
&lt;/div>&lt;/figure>
&lt;/p>
&lt;p>The left figure depicts the average improvement of the concierge. Here we can see that the improvement decreases when the total bandwidth increases. The reason behind this is at a higher bandwidth, the sensitivity tends to be closer to 0 and the concierge won&amp;rsquo;t do any allocation. Overall, this confirms our previous result that with the help of uav-1, the concierge can improve the f1-score up to 0.1. The next experiment is to randomly pick 3 dds videos out of 10 videos that will be generated 10 times. We would like to see how it perfoms without any help of uav-1.&lt;/p>
&lt;p>
&lt;figure >
&lt;div class="d-flex justify-content-center">
&lt;div class="w-100" >&lt;img src="./images/random_merged.png" alt="Random Merged" loading="lazy" data-zoomable />&lt;/div>
&lt;/div>&lt;/figure>
&lt;/p>
&lt;p>From the result, we still managed to get the improvement. However, it seems that average improvement decreases compared to the previous one. The reason of this phenomenon will be discussed later.&lt;/p>
&lt;h3 id="overhead-measurement">Overhead Measurement&lt;/h3>
&lt;p>
&lt;figure >
&lt;div class="d-flex justify-content-center">
&lt;div class="w-100" >&lt;img src="./images/overhead_1.png" alt="Overhead Measurement" loading="lazy" data-zoomable />&lt;/div>
&lt;/div>&lt;/figure>
&lt;/p>
&lt;p>From the graph above, each graph represents the total bandwidth used. In this experiment, it is clearly known that the lower MI leads to higher overhead since there would be more profiling process than higher MI. From the 4 graphs above, it can be known that there would be a significant trade off if we lower the MI since the improvement itself is not highly significant. The highest improvement is at &lt;strong>1200kbps&lt;/strong>. Hence, for higher bandwidth, there is no need to do the profiling too often&lt;/p>
&lt;h2 id="discussion">Discussion&lt;/h2>
&lt;p>There are some limitations of our current design. If we have a look at box-plot in figure 5 above, we can see that there is some combinations where the improvement is negative.&lt;/p>
&lt;p>
&lt;figure >
&lt;div class="d-flex justify-content-center">
&lt;div class="w-100" >&lt;img src="./images/recovery_failed.png" alt="Failed Recovery" loading="lazy" data-zoomable />&lt;/div>
&lt;/div>&lt;/figure>
&lt;/p>
&lt;p>The figure above depicts the profiling process from the segment 6 to determine the bandwidth used at segment 7. Here we can see that the f1-score at that bandwidth for (&lt;span style="color:blue">&lt;em>jakarta&lt;/em>&lt;/span>) drops significantly. Our current design cannot address this issue yet since we only consider current video segment. There is a need to not only look at current segment, but also the previous and the future segment should be taken into account as well.&lt;/p>
&lt;p>Regarding the overhead, we are aware that 50% overhead is still considered bad. We might as well try the dynamic &lt;code>MI&lt;/code> or skip the profiling for certain video if not neccesarry.&lt;/p>
&lt;h2 id="conclusion">Conclusion&lt;/h2>
&lt;p>Regardless the aforementioned limitations, this report shows that the concierge is generally capable of giving an f1-score improvement. The update of the next will be shown in the final report later.&lt;/p>
&lt;h2 id="references">References&lt;/h2>
&lt;p>&lt;a id="acc">[1]&lt;/a> &lt;a href="https://drive.google.com/file/d/1U_o0IwYcBNF98cb5K_h56Nl-bQJSAtMj/view?usp=sharing" target="_blank" rel="noopener">https://drive.google.com/file/d/1U_o0IwYcBNF98cb5K_h56Nl-bQJSAtMj/view?usp=sharing&lt;/a> &lt;br>
&lt;a id="dds">[2]&lt;/a> Kuntai Du, Ahsan Pervaiz, Xin Yuan, Aakanksha Chowdhery, Qizheng Zhang, Henry Hoffmann, and Junchen Jiang. 2020. Server-driven video streaming for deep learning inference. In Proceedings of the Annual conference of the ACM Special Interest Group on Data Communication on the applications, technologies, architectures, and protocols for computer communication. 557–570.&lt;/p></description></item><item><title>Reproduce and benchmark self-adaptive edge applications under dynamic resource management</title><link>https://deploy-preview-1007--ucsc-ospo.netlify.app/report/osre23/uchicago/edgebench/20230530-zharfanf/</link><pubDate>Tue, 30 May 2023 00:00:00 +0000</pubDate><guid>https://deploy-preview-1007--ucsc-ospo.netlify.app/report/osre23/uchicago/edgebench/20230530-zharfanf/</guid><description>&lt;p>Hello there!&lt;/p>
&lt;p>I am Faishal Zharfan, a senior year student studying Telecommunication Engineering at Bandung Institute of Technology (ITB) in Bandung, Indonesia, my &lt;a href="https://drive.google.com/file/d/1u3UsCQZ40erpPmyoyn8DEVqH5Txmvvkz/view?usp=drive_link" target="_blank" rel="noopener">proposal&lt;/a>. I&amp;rsquo;m currently part of the &lt;a href="https://deploy-preview-1007--ucsc-ospo.netlify.app/project/osre23/uchicago/edgebench/">Edgebench&lt;/a> under the mentorship of Yuyang Huang. The main goal of this project is to be able to reproduce and benchmark self-adaptive video applications using the proposed solution.&lt;/p>
&lt;p>The topic that I&amp;rsquo;m currently working on is &amp;ldquo;Reproduce and benchmark self-adaptive edge applications under dynamic resource management&amp;rdquo; or known as edgebench is led by Prof. Junchen Jiang and Yuyang Huang. Edgebench is a project that focuses on how to efficiently distribute resource (bandwidth and cpu usage) across several video applications. Nowaday&amp;rsquo;s video applications process its data or video on a server or known as edge computing, hence bandwidth or compute unit may be the greatest concern if we talk about edge computing in terms of WAN, because it is strictly limited. We may distribute the bandwidth evenly across the cameras, however the needs of bandwidth/compute unit of each camera is different. Therefore we need another solution to tackle this problem, the solution proposed recently is called &amp;ldquo;accuracy gradient&amp;rdquo;, with this solution, we can tell how much of one application needs the bandwidth on a certain time to achieve higher accuracy. The goal of this solution is to allocate more bandwidth to the apps which has the higher f1-score improvement and reduce the other which doesn&amp;rsquo;t have a significant diminishment of f1-score. Henceforth, in the end we would have a higher total f1-score.&lt;/p>
&lt;p>Throughout this summer, we have planned to implement the &amp;ldquo;accuracy gradient&amp;rdquo; and test several baselines to be compared with the solution. As for the implementation, we are currently implementing the latency measurement. We are aware that there is an overhead over this solution, therefore the latency should be taken into account.&lt;/p></description></item></channel></rss>