检索规则说明:AND代表“并且”;OR代表“或者”;NOT代表“不包含”;(注意必须大写,运算符两边需空一格)
检 索 范 例 :范例一: (K=图书馆学 OR K=情报学) AND A=范并思 范例二:J=计算机应用与软件 AND (U=C++ OR U=Basic) NOT M=Visual
作 者:包晓安[1] 聂凡杰 徐璐 张娜[1] 吴彪 BAO Xiaoan;NIE Fanjie;XU Lu;ZHANG Na;WU Biao(School of Information Science and Technology,Zhejiang Sci-Tech University,Hangzhou 310018,China;Department of East Asian Studies,Yamaguchi University,Yamaguchi 753-8514,Japan)
机构地区:[1]浙江理工大学信息学院,杭州310018 [2]山口大学东亚研究科,日本山口753-8514
出 处:《浙江理工大学学报(自然科学版)》2020年第4期520-526,共7页Journal of Zhejiang Sci-Tech University(Natural Sciences)
基 金:浙江省重点研发计划项目(2020C03094);浙江省自然科学基金青年基金项目(LQ20F050010);浙江省公益技术研究计划项目(GG20F010028)。
摘 要:吞吐量对服务端框架的处理效率有着重要的影响,为了进一步提升传统服务端框架的吞吐量,提出了一种基于Reactor模式与非阻塞IO的服务端框架。首先,对Reactor模式与非阻塞IO进行了优势分析,并阐述了Reactor线程池的分发逻辑;其次,通过设计自适应缓冲区结构降低了内存分配次数,提升了数据读入和写出的效率;最后,通过设计双缓冲结构优化了日志的写入操作,提升了日志写入效率。实验结果显示:在单线程测试环境下,对比libevent,该服务端框架吞吐量平均提升了9%;在多线程测试环境下,分别在100连接与1000连接时,对比Boost.Asio,该服务端框架吞吐量分别平均提升了28.66%与20.76%。这表明该服务端框架吞吐量较高,可应用于较大数据量请求的场景。Throughput has an important impact on the processing efficiency of server-side framework.In order to further improve the throughput of traditional server-side frameworks,a server-side framework based on the Reactor pattern and non-blocking IO is proposed.Firstly,an analysis was made on the advantages of the Reactor pattern and non-blocking IO,and an exposition was made on the distribution logic of the Reactor thread pool.Secondly,an adaptive buffer structure was designed for purpose of reducing the number of memory allocations and improving the efficiency of data reading and writing.Last,the log write operation was optimized by designing a double-buffer structure,which improved the log write efficiency.The experimental results show that in the case of a single-threaded test environment,the throughput of the server-side framework is increased by 9%on average compared to libevent;in the case of a multi-threaded test environment,the throughput of the server-side framework,at 100 and 1000 connections respectively,is increased by 28.66%and 20.76%on average compared with Boost.Asio.This shows that the server-side framework has high throughput and can be applied to scenarios with large data volume requests.
分 类 号:TP311.5[自动化与计算机技术—计算机软件与理论]
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在链接到云南高校图书馆文献保障联盟下载...
云南高校图书馆联盟文献共享服务平台 版权所有©
您的IP:3.14.133.138