核聚变电源轻量时序存储引擎设计与测试

Design and testing of lightweight time-series storage engine for nuclear fusion power supplies

  • 摘要: 针对磁约束核聚变辅助加热电源脉冲运行中的高频暂态波形存储需求,设计了基于Qt的轻量化嵌入式时序存储引擎。该方案借鉴键值分离思想,以SQLite管理元数据,以内存映射二进制文件及双缓冲保存波形。采用真实电压、电流导出记录,在Linux容器中对独立Python存储核心参考实现开展离线测试。由40 MHz序列循环扩展的500万点负载下,SQLite逐样本表与混合路径的平均应用写入耗时分别为2593.20 ms和21.16 ms;程序正常完成、无崩溃断电时,有效64位浮点序列的逐字节读回一致率为100%。每秒存储一次100万点的周期任务中,3轮平均进程中央处理器占用分别为50.59%和0.69%。结果支持分离元数据与波形可降低所测软件路径的开销;结论限于所列离线参考实现及缓存条件,不代表Qt原型的性能、在线控制闭环或故障持久性。

     

    Abstract:
    Background Pulsed auxiliary heating power supplies used in magnetic confinement fusion generate transient voltage and current waveforms. Recording these waveforms requires the storage engine to handle large batches of samples while preserving their binary representation. Waveform samples and acquisition metadata have different storage requirements: samples are written in large blocks, whereas metadata are updated less frequently and used to locate the corresponding records.
    Purpose To design a lightweight embedded time-series storage engine for transient waveforms and evaluate its write time, process CPU utilization, read performance, and readback integrity against a SQLite baseline that stores one sample per row.
    Methods The Qt-based design stores metadata in SQLite and waveform samples in memory-mapped binary files. Two alternating buffers stage waveform blocks for writing. An independent Python reference implementation of the storage core was benchmarked in a Linux container using historical voltage and current records. The five-million-sample workload was constructed by cyclically replaying an exported voltage sequence whose timestamps corresponded to a sampling rate of 40 MHz. The evaluation covered batch writes, periodic storage, byte-for-byte readback checks, and sequential and random reads.
    Results For the five-million-sample workload, the mean application-level write time was 2593.20 ms for the per-sample SQLite table and 21.16 ms for the hybrid path. All tested binary64 sequences matched their input byte for byte after normal completion without a crash or power failure. When one million samples were submitted as a batch once per second, mean process CPU utilization across three runs was 50.59% for the SQLite baseline and 0.69% for the hybrid path. The evaluation also quantified CPU variability using standard deviations and characterized sequential and random reads using throughput and latency.
    Conclusions Under the tested workloads and cache conditions, the hybrid storage path reduced application-level write time and process CPU utilization while preserving the tested waveform sequences through write and readback. These measurements characterize the Python reference implementation. The performance of the Qt prototype, timing during online closed-loop operation, and durability under crashes or power loss require separate validation.

     

/

返回文章
返回