Harbor Deep Dive - Open source trusted cloud native registryService Harbor components 3rd party components SQL Database Key/Value Storage Persistence components Local or Remote Storage (block, file, object) Users (GUI/API) Container Schedulers/Runtimes0 码力 | 15 页 | 8.40 MB | 1 年前3
C++高性能并行编程与优化 - 课件 - 08 CUDA 开启的 GPU 编程个元素,按理说应 该卡的不行了,却还是非常快的样子? • 那是因为 CUDA 编译器比较聪明,自动优化 了……稍后会解释他优化的原理。 解决:线程局部变量 • 解决方法之一就是:先累加到局部变量 local_sum ,最后一次性累加到全局的 sum 。 • 这样每个线程就只有一次原子操作,而不 是网格跨步循环的那么多次原子操作了。 当然,我们需要调小 gridDim * blockDim 先读取到线程局部数组,然后分步缩减 • 刚刚我们直接用了一个 for 循环迭代所有 1024 个元 素,实际上内部仍然是一个串行的过程,数据是强烈 依赖的( local_sum += arr[j] 可以体现出,下一时刻 的 local_sum 依赖于上一时刻的 local_sum )。 • 要消除这种依赖,可以通过右边这样的逐步缩减,这 样每个 for 循环内部都是没有数据依赖,从而是可以 并行的(对 CPU 先读取到线程局部数组,然后分步缩减 • 刚刚我们直接用了一个 for 循环迭代所有 1024 个元 素,实际上内部仍然是一个串行的过程,数据是强烈 依赖的( local_sum += arr[j] 可以体现出,下一时刻 的 local_sum 依赖于上一时刻的 local_sum )。 • 要消除这种依赖,可以通过右边这样的逐步缩减,这 样每个 for 循环内部都是没有数据依赖,从而是可以 并行的(对 CPU0 码力 | 142 页 | 13.52 MB | 1 年前3
Await-Tree Async Rust 可观测性的灵丹妙药 - 赵梓淇下一次 Handle Await Tree 的实现 Await Tree 的设计原理与实现 • 一棵树代表一个 Task 的执行状态 • Task 单线程执行 • 在 Task-Local Storage 中无竞争维护 • 使用 Arena Tree 简化实现 • 无 Unsafe 代码 Await Tree 的实现 Await Tree 的设计原理与实现 • Future Adapter risingwave.com • GitHub 4.5k Stars • “Materialized View” • 计算:分布式流计算任务,实时增量维护 • 存储: S3 上的 Shared-storage 存储状态和数据 Await Tree 在 RisingWave 中的应用 • 技术挑战 • 计算任务需长期执行,稳定性要求高 • 算子逻辑复杂,计算与存储读写穿插,强依赖 Async •0 码力 | 37 页 | 8.60 MB | 1 年前3
C++高性能并行编程与优化 - 课件 - 15 C++ 系列课:字符与字符串_M_dataplus 的基类 allocator _M_string_length _M_allocated_capacity _M_local_buf (unused) _M_p _M_string_length _M_allocated_capacity _M_local_buf (unused) (unused) _M_allocator 32 字节 40 字节 优化后 优化前 1B 8 字节 空基类优化:动手做实验 string 的小字符串优化 • 继续往下看。看到下面有一个 _M_local_buf 的字符数组,和 size_t 的 _M_allocated_capacity 的成员变量。其中 _M_local_buf 大小是 16 ,常量 _S_local_capacity 为 15 / sizeof(char) 也就是 15 。 • 这个意思是,当字符串长度小于 这个意思是,当字符串长度小于 16 字节时,不是像 vector 一样 把数据存在堆上(通过 new 分配的),而是存储在 _M_local_buf 里。 string 的小字符串优化 • 这称之为小字符串优化,小字符串的上限是 15 字节,而不是 16 字节,为什么?看到这里的 _S_local_capacity + 1 了没,他是为 了给 ‘ \0’ 留个空位,为的是让 c_str 总能正常得到 0 结尾字符串。0 码力 | 162 页 | 40.20 MB | 1 年前3
C++20: An (Almost) Complete Overviewconversion: Convert UTC to Denver time: zoned_time denver { "America/Denver", utc }; Get current local time: auto localt { zoned_time { current_zone(), system_clock::now() } }; Output: cout << localt error: not constant ❌73 constinit Static initialization order fiasco Variables with static storage and dynamic initializers bugs due to undefined order of dynamic initializations ❌ Static0 码力 | 85 页 | 512.18 KB | 6 月前3
C++高性能并行编程与优化 - 课件 - 07 深入浅出访存优化复内存分配一次(进入一次内核态),非 常浪费时间。 解决:手动池化 • 声明为 static 变量,这样第二次进入 func 的时候还是 同一个数组,不需要重复分配内存。 thread_local 表示 如有多个线程,每个线程保留一个 tmp 对象的副本, 防止多线程调用 func 出错。 • 返回时(或者进入时)调用 tmp.clear() 清除已有数据。 由于 vector 的特性,他只会把 to 29 X faster. • By using Morton ordering as an alternative to row-major or column-major data storage, significant speedups can be achieved on the Intel Xeon Phi coprocessor or Intel Xeon CPU when0 码力 | 147 页 | 18.88 MB | 1 年前3
Автоматизация управления ClickHouse-кластерами в Kubernetesn" metadata: name: "demo-01" spec: configuration: clusters: - name: "demo" Здесь нет storage Еще вернемся к этому kubectl – наше всё 1. NAMESPACE $ kubectl create namespace demo namespace/demo Persistent Storage apiVersion: "clickhouse.altinity.com/v1" kind: "ClickHouseInstallation" metadata: name: "storage" spec: defaults: templates: volumeClaimTemplate: storage-vc-template name: storage-vc-template persistentVolumeClaim: spec: accessModes: - ReadWriteOnce resources: requests: storage: 2Gi0 码力 | 44 页 | 2.24 MB | 1 年前3
唐刚 - Use Rust to Develop the Decentralized Open Data Application - RustChinaConf2023互联网企业的发展模式 Web3? So-called Web3 ? Where is the Next Stage ★ Blockchain ★ Decentralized Ledger Storage: MPT (Merkle Patricia Tree) ★ K-V database ★ Smart Contract ★ Serverless The Weapons Web3 Utilizes stage of Internet? Or just a gimmick by cloud platform ➔ Wants to extend the financial computation/storage model to general cases • Limites of On-chain VM computation • Limites of MPT • Limites of K-V0 码力 | 30 页 | 2.53 MB | 1 年前3
基于Rust-vmm实现Kubernetes运行时language • Secure: Minimal hardware emulation • Flexible: Easy to customize to fit various network, storage and OS environments • High-performance: Leverage KVM capability Advantage of Rust-VMM • Google image: nginx EOT Rust- VMM Demo Future Works • Extend Rust-VMM to support networking and storage • Security policy integration • Develop a new fully Rust-based runtime for edge computing • Support0 码力 | 27 页 | 34.17 MB | 1 年前3
C++高性能并行编程与优化 - 课件 - 10 从稀疏数据结构到量化数据类型索性把坐标和值打包成 tuple ,存储在 vector 按行压缩( Compressed Row Storage ) http://www.netlib.org/linalg/html_templates/node91.html 按行压缩( Compressed Row Storage ) http://www.netlib.org/linalg/html_templates/node910 码力 | 102 页 | 9.50 MB | 1 年前3
共 23 条
- 1
- 2
- 3













