Page 477 - 《软件学报》2024年第4期
P. 477

软件学报 ISSN 1000-9825, CODEN RUXUEW                                        E-mail: jos@iscas.ac.cn
                 Journal of Software,2024,35(4):2055−2075 [doi: 10.13328/j.cnki.jos.006900]  http://www.jos.org.cn
                 ©中国科学院软件研究所版权所有.                                                          Tel: +86-10-62562563



                                                                   *
                 HiLog: OpenHarmony          的高性能日志系统

                 吴圣垚  1 ,    王    枫  1 ,    武延军  1,2 ,    凌    祥  1 ,    屈    晟  1 ,    罗天悦  1 ,    吴敬征  1,2


                 1
                  (中国科学院 软件研究所 智能软件研究中心, 北京 100190)
                  (计算机科学国家重点实验室       (中国科学院 软件研究所), 北京 100190)
                 2
                 通信作者: 武延军, E-mail: yanjun@iscas.ac.cn

                 摘 要: 日志是计算机系统中记录事件状态信息的的重要载体, 日志系统负责计算机系统的日志生成、收集和输
                 出. OpenHarmony  是新兴的、面向全设备、全场景的开源操作系统. 在所述工作之前, 包括日志系统在内
                 OpenHarmony  有许多关键子系统尚未构建, 而        OpenHarmony  的开源特性使第三方开发者可以为其贡献核心代码.
                 为了解决   OpenHarmony 日志系统缺乏的问题, 主要开展如下工作: ① 分析当今主流日志系统的技术架构和优缺点;
                 ② 基于  OpenHarmony  操作系统的异构设备互联特性设计            HiLog  日志系统模型规范; ③ 设计并实现第          1  个面向
                 OpenHarmony  的日志系统   HiLog, 并贡献到  OpenHarmony  主线; ④ 对  HiLog  日志系统的关键指标进行测试和对
                 比试验. 实验数据表明, 在基础性能方面, HiLog           和  Log  的日志写入阶段吞吐量分别为         1 500 KB/s 和  700 KB/s,
                 相比  Android  日志系统吞吐量提升     114%; 在日志持久化方面, HiLog     可以  3.5%  的压缩率进行持久化, 并且丢包率
                 小于  6‰, 远低于  Log. 此外, HiLog  还具备数据安全、流量控制等新型实用能力.
                 关键词: 操作系统; 日志系统; 开源软件; 数据安全; 流量控制
                 中图法分类号: TP316

                 中文引用格式: 吴圣垚, 王枫, 武延军, 凌祥, 屈晟, 罗天悦, 吴敬征. HiLog: OpenHarmony的高性能日志系统. 软件学报, 2024,
                 35(4): 2055–2075. http://www.jos.org.cn/1000-9825/6900.htm
                 英文引用格式: Wu SY, Wang F, Wu YJ, Ling X, Qu S, Luo TY, Wu JZ. HiLog: High Performance Log System of OpenHarmony.
                 Ruan Jian Xue Bao/Journal of Software, 2024, 35(4): 2055–2075 (in Chinese). http://www.jos.org.cn/1000-9825/6900.htm

                 HiLog: High Performance Log System of OpenHarmony
                                                  1,2
                                       1
                            1
                                                                       1
                                                                                   1
                                                              1
                 WU Sheng-Yao , WANG Feng , WU Yan-Jun , LING Xiang , QU Sheng , LUO Tian-Yue , WU Jing-Zheng 1,2
                 1
                 (Intelligent Software Research Center, Institute of Software, Chinese Academy of Sciences, Beijing 100190, China)
                 2
                 (State Key Laboratory of Computer Science (Institute of Software, Chinese Academy of Sciences), Beijing 100190, China)
                 Abstract:  Log  is  an  important  carrier  of  a  computer  system,  which  records  the  states  of  events,  and  a  log  system  is  responsible  for  log
                 generation,  collection,  and  output.  OpenHarmony  is  a  new  open-source,  distributed  operating  system  for  smart  devices  in  all  scenarios  of  a
                 fully-connected world. Prior to the work described in this study, many key subsystems of OpenHarmony, including the log system, had not
                 been  built.  The  open-source  feature  of  OpenHarmony  enables  third-party  developers  to  contribute  core  codes.  To  solve  the  problem  of  the
                 lack  of  a  log  system  of  OpenHarmony,  this  paper  mainly  does  the  following  work:  ①  It  analyzes  the  technical  architecture,  advantages,
                 and  disadvantages  of  today’s  popular  log  systems.  ②  It  clarifies  the  model  specifications  of  the  log  system  HiLog  according  to  the
                 interconnection  feature  of  heterogeneous  devices  in  OpenHarmony.  ③  It  designs  and  implements  the  first  log  system  HiLog  of
                 OpenHarmony  and  contributes  it  to  the  OpenHarmony  trunk.  ④  It  conducts  comparative  experiments  on  the  key  indicators  of  HiLog.  The
                 experimental  data  show  that  in  terms  of  basic  performance,  the  throughput  of  HiLog  and  Log  is  1500  KB/s  and  700  KB/s,  respectively,
                 which  indicates  that  HiLog  has  a  114%  improvement  over  the  log  system  of  Android.  In  terms  of  log  persistence,  the  packet  loss  of


                 *    基金项目: 中国科学院战略性先导科技专项      (XDA0320000); 国家自然科学基金青年项目      (62202457); 中国博士后科学基金
                  (2022M713253)
                  收稿时间: 2022-09-15; 修改时间: 2022-10-24; 采用时间: 2022-12-08; jos 在线出版时间: 2023-06-28
                  CNKI 网络首发时间: 2023-06-29
   472   473   474   475   476   477   478   479   480   481   482