会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
Lht1
博客园
首页
新随笔
联系
订阅
管理
上一页
1
2
3
4
5
下一页
2024年6月14日
unbound中缓存时间逻辑
摘要: unbound可以通过配置文件中的cache-max-ttl来设置缓存的最大缓存时间,这个会保存MAX_TTL全局变量(默认值是10天)。 unbound在处理递归响应时的调用链是comm_point_udp_callback -> outnet_udp_cb -> serviced_udp_cal
阅读全文
posted @ 2024-06-14 01:09 yghr
阅读(152)
评论(0)
推荐(0)
2024年6月9日
利用perf进行性能分析
摘要: 对进程进行采集,采集后会在当前目录下生成一个perf.data文件 perf record -e cpu-clock --call-graph dwarf [-t 线程id] [-p 进程id] 这里只针对cpu时间进行了采样,通过perf list命令还可以看到更多采样事件。 简单分析 perf
阅读全文
posted @ 2024-06-09 19:18 yghr
阅读(85)
评论(0)
推荐(0)
glibc中的localtime方法源码分析
摘要: localtime方法会加锁,当TZ环境变量为空或者变更时,还会读取文件,还有个问题就是这个方法返回的指针是一个全局变量,可以使用redis无锁的localtime方法来优化这个性能。 localtime方法调用链:localtime -> __localtime64 -> __tz_convert
阅读全文
posted @ 2024-06-09 19:05 yghr
阅读(304)
评论(0)
推荐(0)
2024年3月31日
redis 5.0命令处理流程
摘要: redis 5.0 命令处理流程 初始化事件驱动数据结构: initServer 中调用 aeCreateEventLoop 方法初始化 server.el 属性,然后调用 listenToPort 方法设置 listen 的 fd,并为这些 fd 绑定读事件 anetTcpHandler。 ane
阅读全文
posted @ 2024-03-31 22:46 yghr
阅读(32)
评论(0)
推荐(0)
unbound源码分析
摘要: unbound源码分析 版本: 1.17.2 编译选项: ./configure --prefix=your_path --enable-subnet --enable-debug --with-libevent 请求调用栈: 看了worker_handle_request的源码,unbound也是
阅读全文
posted @ 2024-03-31 20:27 yghr
阅读(223)
评论(0)
推荐(0)
2023年12月18日
redis中的hash tag
摘要: 在集群模式下,如果lua脚本同时操作多个key,可能会出现:CROSSSLOT Keys in request don't hash to the same slot的错误。 这种情况下,可以通过{...},来指定多个key使用相同的内容进行hash,例如:user:{123}:username和u
阅读全文
posted @ 2023-12-18 15:15 yghr
阅读(198)
评论(0)
推荐(0)
2023年12月1日
kprobes源码走读
摘要: 粗略看了下kernel/kprobes.c下的register_kprobe方法。 逻辑: 调用kprobe_addr方法来根据symbol或者addr+offset来获取需要劫持的地址,symbol和addr不能同时设置,symbol是利用kprobe_lookup_name -> kallsym
阅读全文
posted @ 2023-12-01 17:41 yghr
阅读(46)
评论(0)
推荐(0)
2023年11月30日
Linux下实现文件系统(占坑)
摘要: 前提知识: 先要摸清楚vfs是啥玩意。 实现文件系统有两种方式:直接写Linux Kernel Module,另一种是基于现有fuse内核模块,在用户态实现与fuse内核模块交互,在此基础上还可以实现网络分布式文件系统。 https://www.kernel.org/doc/html/next/fi
阅读全文
posted @ 2023-11-30 10:42 yghr
阅读(29)
评论(0)
推荐(0)
2023年11月13日
Generate GraalVM Reachability Metadata
摘要: reference: https://graalvm.github.io/native-build-tools/latest/maven-plugin.html#agent-support maven项目配置native-image插件使用tracing-agent跑单测生成reachability
阅读全文
posted @ 2023-11-13 02:11 yghr
阅读(113)
评论(0)
推荐(0)
2023年10月29日
spring aot分析
摘要: native-image graalvm支持使用native-image工具来生成二进制可执行文件。 对于运行时反射需要使用agent在运行时收集元信息,即META-INF/native-image/xxx/*.json文件。 通过agent收集元数据的文章:https://www.graalvm.
阅读全文
posted @ 2023-10-29 17:09 yghr
阅读(110)
评论(0)
推荐(0)
上一页
1
2
3
4
5
下一页
公告