erlang的IO高效不是传说

# erl -smp +K true
Erlang (BEAM) emulator version 5.6.5 [source] [smp:2] [async-threads:0] [hipe] [kernel-poll:true]

Eshell V5.6.5 (abort with ^G)
1> erlang:system_info(check_io).
[{name,erts_poll},
{primary,epoll},
{fallback,poll},
{kernel_poll,epoll},
{memory_size,9064},
{total_poll_set_size,2},
{fallback_poll_set_size,0},
[color=red] {lazy_updates,true},
{pending_updates,0},
{batch_updates,false},
{concurrent_updates,true},[/color]
{max_fds,1024}]

erl_poll.c是erlang的poll实现。对epoll的lazy update和concurrent_update进行了大量的优化,batch update在freebsd下管用。我讲过的框架包括libevent,ACE,haproxy等等。只有haproxy进行了lazy update但是没有concurrent方面的努力。

erlang的IO读写大多采用gather write, scatter read 方式,在语法方面就有强大的优势,列表操作隐含的就是这个语义。

致敬,多年前就这门挖空心思高性能!
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值