`
mryufeng
  • 浏览: 967715 次
  • 性别: Icon_minigender_1
  • 来自: 广州
社区版块
存档分类
最新评论
文章列表
   历经2年半,花了4000小时以后,对erlang的研究有了很大的进步,从原来的兴趣, 到现在的随意的crack, 调优,改进, 指导erlang程序架构的设计,中间经历了很多。    从一个有20年历史的网络程序身上我学到很多,包括高级服务器程序的架构,调度公平性,网络事件处理, 内存管理, 锁管理, SMP管理, 平台移植, 虚拟机,语言的基本构件,用户交互,调试, 诊断, 调优,工具。 也学会了使用OS提供的工具如systemtap, oprofile,内存, CPU工具来诊断,来定位问题,这个可以参考rhel的调优白皮书。        这个成熟系统带来的经验感受如同你窥视一台 ...
http://mryufeng.iteye.com这里已停止更新,谢谢javaeye的优质服务。 以后会在独立的域名http://yufeng.info下更新博客, 同时内容也会从Erlang扩展到Linux, 工具,以及编程技术等方面, 谢谢大家的关注。 请朋友们更新书签。 余锋 2011/1/9
以下是这次发布的亮点,没有太大的性能改进, 主要是修理了很多BUG! --- HIGHLIGHTS ----------------------------------------------------------     OTP-8217  == erts stdlib compiler ==       The module binary from EEP31 (and EEP9) is implemented.     OTP-8485  == common_test ==       It is now possible for the user to provide s ...
Erlang的binary数据结构非常强大,而且偏向底层,在作网络程序的时候,很方便的能够和二进制协议对应起来。但是由于这个数据结构加入erlang语言的时间不是很长,相关的配套模块不是很多。 在binary的匹配,替换,修改就显的非常麻烦。 于是有了EEP31 。 R14A昨天已经实现了这个功能, 在stdlib下添加了个binary模块。 这个模块大部分功能是由BIF实现的,同时充分考虑了CPU使用的公平性,源码大部分在erl_bif_binary.c下。 还添加了个gurad函数: binary_part进一步方便我们写匹配条件。 我们在源码里面发现了以下注释: /* * The nat ...
很多同学在使用erlang的过程中, 碰到了很奇怪的问题, 后来查明都是文件句柄不够用了, 因为系统默认的是每个进程1024. 所以我们有必要在程序运行的时候, 了解这些信息, 以便诊断和预警. 下面的这个程序就演示了这个如何查看节点的可用句柄数目和已用句柄数的功能. 首先确保你已经安装了lsof, 我的系统是ubuntu可以这样安装. root@ubuntu:~# apt-get -y install lsof   root@ubuntu:~# cat fd.erl -module(fd). -export([start/0]). get_total_fd_ulimit() - ...
从lib/megaco/src/tcp/megaco_tcp_connection.erl摘抄的代码, 挺详细的关于系统的信息: SchedId = erlang:system_info(scheduler_id), SchedNum = erlang:system_info(schedulers), ProcCount = erlang:system_info(process_count), ProcLimit = erlang:system_info(process_limit), ProcMemUsed = ...
看到erlang-china.org上有个帖子在问这个问题 引用一直不太明白iolist,跟list到底有什么区别?请各位大侠指教。。 我翻看了半天erlang的文档也没写的太明白,所以就看看源码: erts/emulator/beam/utils.c 3015int io_list_len(Eterm obj) 3016{ 3017 ...
前段时间arksea 同学提出这个问题, 因为文档里面写的很不明白.     erlang:send_after(Time, Dest, Msg) -> TimerRef     Time = int()     0 <= Time <= 4294967295     Dest = pid() | RegName     LocalPid = pid() (of a process, alive or dead, on the local node)     Msg = term()     TimerRef = ref()     Starts a timer which ...
参考Talk http://www.erlang-factory.com/upload/presentations/238/ErlangFView postactorySFBay2010-KennethLundin.pdf 摘抄我感兴趣的: R14要实现的: 1. June 16: R14A, a beta release 2. Multi-core performance improvements     * – optimized rwlocks     * – delayed deallocation     * – ”lock-free” process table 3. NIF ...
郎咸武<langxianzhe@163.com>  同学在erlang-china上post了一个问题: 请注意编号为91和92两行运行结果,请问为什么会出现两种结果。 一个抛出 {error,{badmatch,5}} 另一个抛出** exception error: no match of right hand side value 4 view source print? 01 root@ubuntu:/usr/src/otp# erl 02 Erlang R13B04 (erts-5.7.5) [smp:2:2] [rq:2] [async-threads:0] [hipe] ...
其实Erts的Async做的很不错的, 相当的完备, 性能又高. 但是奇怪的是只有文件driver才真正利用到了这个优势. 难道是OTP团队的人,不想为了性能把事情搞的复杂了. Driver和最近加入的NIF都提供了大量的线程,锁,同步的原语来支持最大的程度的利用单线程的优势. 俺会做小白鼠来参试这些被遗忘的设施.
原文地址: http://haproxy.1wt.eu/10g.html 点滴优化造就了今天的性能, willy好样的,应该是目前软件做到的最好的数字 Introduction       It was my first test since I moved house. I wanted to quickly plug the machines together to see if my work on version 1.4 went into the right direction, and most importantly was not causing performance d ...
基于Erlang的云平台 看了下代码 质量还是不错的 完成了不少, 兴趣的同学可以参观下 CloudI 0.0.9 (alpha) Homepage:   http://cloudi.org Download: http://sourceforge.net/projects/cloudi/files/0.0.9a/cloudi-0.0.9.tar.gz/download Source:   http://github.com/okeuday/CloudI/tree/master#readme ABOUT CloudI is an open-source private cloud com ...
原文地址:http://www.lshift.net/blog/2010/02/28/memory-matters-even-in-erlang 作者解决问题的思路非常敬佩! 真没想到hibernation后, 由于对象的移动, 使得内存访问的不连续, 导致内存cahche的失效, 速度可以慢这么多! Some time ago we got an interesting bug report for RabbitMQ. Surprisingly, unlike other complex bugs, this one is easy to describe: At some point ...
原文地址 http://www.lshift.net/blog/2008/01/31/some-simple-examples-of-using-erlangs-xpath-implementation 这篇文章很好的介绍了xmerl_xpath 这个很方便的东西, 而在官方的文档里, 一笔带过, 让人不识宝,我把它挖掘出来,有兴趣的同学折腾折腾... We’ve been investigating the possibility of an XPath-based routing extension to RabbitMQ, where XPath would be used as ...
Global site tag (gtag.js) - Google Analytics