ITPub博客

首页 > 数据库 > 数据库开发技术 > 【Rust日报】2020-12-04 Glommio:一个基于Linux io_uring的高效多核线程调度库

【Rust日报】2020-12-04 Glommio:一个基于Linux io_uring的高效多核线程调度库

原创 数据库开发技术 作者:Rust语言中文社区 时间:2020-12-04 23:16:36 0 删除 编辑

Glommio - a Thread-per-Core Crate for Rust & Linux

Glommio是一个基于Linux io_uring的高效多核线程调度库,它可以让你的程序做到thread-per-core级别的线程调度,每个线程只分配给一个单独的核,避免线程调度时候的context switch开销。它甚至可以把线程手动pin到某个核上。

 
/// This will now never leave CPU 0
use glommio::LocalExecutorBuilder;
LocalExecutorBuilder::new().pin_to_cpu(0).spawn(|| async move {
// your code here
}).unwrap();
这个库还在比较早期的阶段,依然存在unsafe代码(但作者声称以后可以去掉),而且还有两个关键特性没有实现:
  • communication channels between executors so we can pass Send data.
  • per-shard memory allocator.
链接:https://www.datadoghq.com/blog/engineering/introducing-glommio/
Github:https://github.com/DataDog/glommio

lib-ruby-parser - Rust写的ruby解析器

链接:https://ilyabylich.svbtle.com/lib-ruby-parser
Github: https://github.com/lib-ruby-parser/lib-ruby-parser

《Rust Performance Book》作者从Mozilla离职

《Rust Performance Book》的作者 Nicholas Nethercote 在Mozilla工作了超过12年,其中部分工作 负责rustc的性能监控和优化(rustc-perf项目)。Nicholas离职后去的新公司是Apple。
链接:https://blog.mozilla.org/nnethercote/2020/12/04/farewell-mozilla/

Blades - 又一个 Rust 写的静态网站生成器,速度极快,号称比 Hugo 快10倍

链接:https://www.getblades.org/
-- From 日报小组 Folyd, broono
社区学习交流平台订阅:
Rustcc论坛: 支持rss
微信公众号:Rust语言中文社区

原文作者:Rust语言中文社区;如有侵权,请联系管理员删除。

请登录后发表评论 登录
全部评论

注册时间:2020-06-11

  • 博文量
    1769
  • 访问量
    718505