Skip to content

Linux中的select函数

最近在排查一个用户同步数据非常慢的问题。使用perf trace -S -p $pid发现,进程的大部分时间花费在了select函数上: 凭直觉觉得有些异常。按照Linux手册上对select的说法: select() allow a program to monitor multiple file descriptors, waiting until one or more of the file descriptors become “ready” for some class of I/O operation (e.g., input possible). A file descriptor is considered…

Read more
Sidebar