首页|高频数据访问场景下的单体架构性能优化

高频数据访问场景下的单体架构性能优化

扫码查看
单体架构以其数据与程序皆在本地的独特部署方式,获得了其他架构难以比拟的高效与稳定,因此在云时代仍有一席之地,非常适用于面对海量数据的高频数据访问场景,但也存在着单机资源容量难以应对数据增长、服务启动时因数据加载等资源消耗大导致性能抖动、服务或数据更新后因数据变冷带来的交易时间骤升等一系列问题。该文的优化方案中通过使用定址文件映射共享内存技术降低单机内存容量需求、引入中间控制层完成数据和应用解耦、利用写时复制技术实现资源加载成本最小化、利用硬件内存管理单元与页表加热来加速内存访问效率等多项技术,使得上述问题得到有效缓解。实际验证中,单体架构在能够支持更高数据容量的同时,兼顾了数据的快速加载,维持了交易响应时间的稳定性,并且仍然可以保持单体架构的性能优势。这种改良的设计使单体架构的适用范围得到进一步扩大,为有海量数据和高频数据访问需求的实时交易系统提供了一种通用的可选方案。
Performance Optimizations of Monolithic Architecture in High-frequency Data Access System
With its unique way of deploying data and programs locally,the monolithic architecture achieves efficiency and stability that other architectures cannot match.Therefore,it still has a place in the cloud era and is quite suitable for high-frequency data access scenarios facing massive data.However,there are also a series of problems such as the resource capacity of a single machine being difficult to cope with data growth,performance jitters due to high resource consumption such as data loading when starting a service,and a sudden increase in transaction time due to cold data after service or data updates.In this paper,optimization solutions are proposed to ef-fectively alleviate these problems.These solutions include reducing the memory capacity requirements of a single machine by using memory mapping with specified address and shared memory technology,decoupling data and applications through the introduction of an intermediate control layer,minimizing resource loading costs through copy-on-write technology,and accelerating memory access efficiency through hardware memory management units and page table heating.In practical validation,the monolithic architecture not only supports higher data capacity but also maintains stable transaction response times while ensuring rapid data loading.Furthermore,it still retains the performance advantages of the monolithic architecture.This improved design expands the applicability of the monolithic architecture,providing a universal optional solution for real-time transaction systems with massive data and high-frequency data access requirements.

monolithic architecturememory mappingshared memoryhigh-frequency data accesscopy-on-write

刘中一、李梦箫、阎松柏

展开 >

中国民航信息网络股份有限公司,北京 101318

民航旅客服务智能化应用技术重点实验室,北京 101318

单体架构 文件映射 共享内存 高频数据访问 写时复制

2024

计算机技术与发展
陕西省计算机学会

计算机技术与发展

CSTPCD
影响因子:0.621
ISSN:1673-629X
年,卷(期):2024.34(12)