Embedded Benchmarking Lab: Benchmarking, Profiling, and Optimizing Software, Firmware, and Hardware

     「網路系統核心」與「自由軟體」是目前網路通訊產業的兩大底層基礎,也是交大網路測試中心(NBL,由總計劃主持人 – 林盈達教授成立)成立八年來所深耕的兩大重點。從超過 100 家廠商、公開測試活動 23 總計測過的產品超過 600 個測試服務的經驗中了解到廠商對測試工具的需求。因此過去兩年 NBL 也開始和交大研究團隊共同合作,在國科會嵌入式網路通訊裝置評比技術與工具之研發的計畫中擬定一系列測試工具及方法,並將其整合成EBL(Embedded Benchmarking Lab) Test Suite v1.0 來對嵌入式裝置進行評比。

     然而單從最上層的應用程式進行測試,或是底層大量除錯資訊尋找問題,很難從龐大測試結果及除錯資訊發現效能瓶頸範圍是座落在應用程式內部、Java Run Time 環境、下層Driver 沒有最佳化或底層硬體設計不良導致系統效能不佳。為此,整個計畫承接過去國科會專案成功經驗及研發技術,組成『嵌入式系統 benchmarking』團隊來為嵌入式產業打造『嵌入式系統測試中心』(Embedded Benchmarking Lab, EBL),目標提供各種測試工具及方法徹底貫穿各層次的測試與分析。總計畫的目標提供一測試共通平台,負責開發嵌入式裝置自動化控制技術,產生嵌入式系統各種應用程式 Workload,提供給各子計畫進行相關技術分析。

     子計畫一及子計畫二主要提供效能及耗能剖析工具,以 top-down 的方式檢視所有軟體及系統效能及耗能。子計畫四及子計畫五也會從硬體面向以 bottom-up 的觀點來檢視硬體元件的執行、檔案系統讀寫效能。而軟、硬體的效能往往也會和系統核心與驅動程式設計有關,因此子計畫三也會同步開發系統核心效能調校服務,整合其他子計畫對軟、硬體效能、耗能剖析資訊做為最佳化參數,對嵌入式系統提供 CPU 排程、快取記憶體配置、電源管理、I/O排程以及快取緩衝演算法等服務,進而提升嵌入式系統效能。最後總計畫除了協助各計畫建置嵌入式系測試環境,也會加入雲端計算(Cloud Computing)實驗環。透過網路強大的傳輸能力,雲端計算的整合也為嵌入式裝置注入一種新的運算模式,為此總計畫提出一套計算量卸載參照設計,並結合子計畫一及子計畫二的研究成果,以嵌入式裝置耗能及效能的觀點來對嵌入式裝置的計算量卸載效能進行評估。整個計畫的分工架構是以嵌入式系統的概念將其分成不同層級進行規劃,並為各階層提供不同的 Benchmarking、Profiling 及 Optimization 方案來服務嵌入式產業的廠商。對於測試方案的推廣,在國際方面 EBL 會和嵌入式自由軟體聯盟(Open Embedded Software Foundation, OESF)的會員工業技術研究院(ITRI)共同合作,針對 Android 裝置制定測試方法及開發測試套件。另外在國內推廣方面,EBL 也和台灣嵌入式產業聯盟(Taiwan Embedded Industry Alliance , TEIA)合作,建立 Testing SIG,負責收集業界的各種測試需求,讓 EBL 可以提供更多符合業界的測試方案來協助嵌入式產業提升競爭力。結合 NBL 的成功經驗,EBL 也會以三種模式進行推廣,包含委託測試服務、公開測試活動以及年度 road show。預計第一年結束時,完成測試工具規格訂定、架構設計以及實驗結果;第二年結束時完成測試工具第一個版本開發並交由 NBL 應用,同時也將開放原始碼供下載;第三年結束時將測試工具產品化、客製化,協助廠商將工具移轉到其內部使用。

     "Network kernel system" and "free software" are two important foundations of the network commnunication industry. They are also what "Network Benchmark Lab (NBL, led by Prof. Ying-Dar Lin)" at NCTU has taken all the efforts for since its founding 8 years ago. NBL has satisfied the requirement of benchmarking through testing 600+ products from 100+ manufacturers and also 23 public benchmarking activities. One step further, NBL has begun to cooperate with a research team at NCTU 2 years ago, and designed a series of tools and test items under the NSC project "Benchmarking embedded networking and communication devices: experiment, development, and deployment of methodologies and tools". The results have been integrated to "EBL (Embedded Benchmarking Lab) Test Suite v1.0".

     However, through the testing at the application level or the huge debugging logs at the lower level, it's hard to figure out which causes the performance bottleneck among software design, JAVA run time environment, driver optimization, and hardware conflict. To inspect the performance of each level efficiently and to construct a benchmarking environment for an embedded system, the main project is responsible for developing the technique of embedded system automatic control to provide the automatically generated workload of application programs to sub-projects such that sub-projects can proceed the related analysis.

     Sub-project 1 and sub-project 2 provide performance and power consumption test tools, respectively, and figure out the performance and the power consumption of software or the whole system in a top-down manner. Sub-project 4 and sub-project 5 evaluate the performance of hardware processing and file system accessing from the hardware viewpoint in a bottom-up manner. The relation with system kernel and device driver for software/hardware integration induces the coordination in sub-project 3. Sub-project 3 integrates all the other sub-projects to examine the services (e.g., CPU scheduling, cache allocation, power management, I/O scheduling, buffer algorighm) that could affect system performance. Finally, in addition to assisting each sub-project to construct the emebedded system benchmarking environment, the "Cloud Computing" environment construction is included in the main-project. Through the network connectivity, the "Cloud Computing" truly provides the embedded system extended capacity. Therefore, the main-project proposes a reference design to offload heavy computations and integrates it to sub-project 1 and sub-project 2 for performance and power consumption profiling. The division and mapping of the whole project are done with the architectural concepts of embedded systems. It's divided into several levels to provide differenct benchmarking, profiling, and optimization services to manufacturers. The standards definition, architecture design, and experimental results of benchmarking tools shall be finished in the 1st year. In the 2nd year, the first version of benchmarking tools will be used by NBL for product testing. Meanwhile, the source code shall be released. In the last year, the tools shall be customized and turned into products for in-house testing by manufacturers.