Skip to main content

· 17 min read
therainisme

在构建 SGX 应用程序时,必须考虑在使用 Enclave 时它们可能遭受的性能下降。这种性能开销主要是由于 Enclave 初始化、PRM 数据的加密/解密以及在普通代码和 Enclave 代码 (Ocall / Ecall)之间切换等因素造成的。其中一些问题与 SGXv1 有关,本文中提出的解决方案,有些已经被 SGXv2 甚至 SGX SDK 的更新所包含。

· 62 min read
therainisme

Abstract  Recently, the Log-Structured Merge-tree (LSM-tree) has been widely adopted for use in the storage layer of modern NoSQL systems. Because of this, there have been a large number of research efforts, from both the database community and the operating systems community, that try to improve various aspects of LSM-trees. In this paper, we provide a survey of recent research efforts on LSM-trees so that readers can learn the state-of-the-art in LSM-based storage techniques. We provide a general taxonomy to classify the literature of LSM-trees, survey the efforts in detail, and discuss their strengths and trade-offs. We further survey several representative LSM-based open-source NoSQL systems and discuss some potential future research directions resulting from the survey.

该篇博客的主要内容是对该综述论文的理解与转述。

· 2 min read
therainisme

LRU-K 中的 K 代表最近使用的次数,传统的 LRU 算法可认为是 LRU-1。LRU-K 核心思想:将“最近使用过 1 次”的判断标准扩展为“最近使用过 K 次”。其主要目的是解决 LRU-1 算法“缓存污染”的问题。

· 2 min read
therainisme

样例

#include <chrono>

void example() {
std::chrono::duration<double, std::milli> total_time(0);

auto start = std::chrono::steady_clock::now();
// do something
auto end = std::chrono::steady_clock::now();

total_time += end - start;

std::cout << "total time: " << total_time.count() << "ms" << std::endl;
}

· 2 min read
therainisme

现代计算机中的内存空间以字节为单位划分,大部分 CPU 都会以 2字节、4字节、8字节......来访问内存。现代 CPU 对齐内存的主要作用是节省内存空间。