yb_lin

导航

2011年3月1日 #

Unity Web Player and browser communication

摘要: The HTML page that contains Unity Web Player content can communicate with that content and vice versa. Basically there are two communication directions: The web page calls functions inside the Unity web player content. The Unity web player content calls functions in the web page. Each of these commu 阅读全文

posted @ 2011-03-01 10:13 废铁 阅读(788) 评论(0) 推荐(0) 编辑

2011年2月24日 #

Linux: CentOS and Out of socket memory

摘要: Just last night I upgraded a system with SWSoft's Virtuozzo to the latest kernel, as of Nov 2, 2006 and promptly reboot. After the reboot was complete and the Virtual Environments (VE's) back up and running, none of the IP's assigned to the VE's was accessible from outside the networ 阅读全文

posted @ 2011-02-24 17:59 废铁 阅读(851) 评论(0) 推荐(0) 编辑

解决大量TCPIP连接后出现“因为系统缺乏足够缓冲区空间或者因为队列已满无法执行套接字上操作”的问题

摘要: 用微软提供的方法,可以放开系统的限制,详细方法见下文,最大理论连接数6万左右,也就是4字节整数的最大值。实际服务器端程序的服务能力取决于开发模型,在 Window 下使用 IOCP 模型效率最高(2K/XP/2003下可用),另外最高并发连接数与服务器的硬件配置特别是内存有很大关系。我实测的最大并发连接数为 3.2万左右,有人通过增加内存和提高配置的方法使并发连接数增加到了5.1万左右,这个数字我没有验证过,仅供参考。症状loadTOCNode(1, 'symptoms');如果您尝试建立 TCP 连接从端口是大于 5000, 本地计算机响应并以下 WSAENOBUFS (10 阅读全文

posted @ 2011-02-24 17:48 废铁 阅读(1166) 评论(0) 推荐(0) 编辑

2011年2月16日 #

如何突破mnesia中关于atom最大数值的限制

摘要: 阅读全文

posted @ 2011-02-16 11:39 废铁 阅读(259) 评论(0) 推荐(0) 编辑

2011年2月14日 #

** WARNING ** Mnesia is overloaded: {dump_log, write_threshold}

摘要: 现象:查看页面,发现数据出现异常,今天生成数据比平常水平偏低好多,不大正常原因查找:查看日志文件,发现有出现了几个这样的警告:** WARNING ** Mnesia is overloaded: {dump_log, write_threshold}在查询时发现好多老外遇到这个问题,这儿要说一点,老外在描述问题上很厉害,这儿把它描述的原因copy下来,和我这儿的情况差不多(当然最后他也没得到想要的结果,不过这是另一说,非重点)view sourceprint?01we encountered the following mnesia warning report in our system 阅读全文

posted @ 2011-02-14 15:13 废铁 阅读(812) 评论(1) 推荐(0) 编辑

2010年10月19日 #

Unity中Resources.LoadAssetAtPath JS和C#的不同写法

摘要: JS版本:1var prefab : GameObject = Resources.LoadAssetAtPath("Assets/Artwork/mymodel.fbx", GameObject);C#版本:1GameObject prefab = (GameObject)Resources.LoadAssetAtPath("Assets/Artwork/mymodel.fbx", typeof... 阅读全文

posted @ 2010-10-19 10:10 废铁 阅读(473) 评论(0) 推荐(0) 编辑

2010年8月18日 #

Erlang代码热替换

摘要: Erlang一个非常值得称道的特性就是代码热替换(Hot Code Sawpping),我们在调用函数时,通过M:F(A)的方式,可以保证总是加载最新的代码。 在《Erlang程序设计》中E4部分,通过一个小例子展示了代码的动态加载,两个module代码如下: 1 a.erl 2 3 Erlang代码 -module(a). 4 -compile(export_all). 5 -import(b,... 阅读全文

posted @ 2010-08-18 09:24 废铁 阅读(962) 评论(0) 推荐(0) 编辑

2010年8月4日 #

Dynamically sizing a fragmented mnesia store

摘要: Not too long ago Mark Zweifel introduced me to Erlang. There are plenty of websites that explain what it is, how it works and where it came from so I'm not going to go into those details right here.Wh... 阅读全文

posted @ 2010-08-04 22:34 废铁 阅读(323) 评论(0) 推荐(0) 编辑

Erlang性能初测

摘要: 安装的CentOS的最初目地是为了进行对Erlang的测试,因为在Windows 2003上连接数到达1024时就出问题了。昨天已经把Erlang编译安装好了,于是马上就可以进行测试了。测试服务器端程序很简单,服务器为每个连接分配一个Erlang进程来为它服务。测试内容是连接10000个客户端。可是结果和Windows系统下一样,到达1024就不行了。原来问题还是出在操作系统对进程数的限制,用ul... 阅读全文

posted @ 2010-08-04 10:17 废铁 阅读(1289) 评论(0) 推荐(0) 编辑

erlang VM中的atom个数限制

摘要: 在erlang 中,atom可以理解成常量,它可以包含任何字符,以小写字母开头,如果不是以小写字母开头或者是字母之外的符号,需要用单引号包括起来,比如abc,’AB’。atom的匹配速度非常快,但是由于erlang VM将所有模块的atom保存在一个全局的atom表中,它的最大限制是1048576,也就是说erlang的VM只能处理1048576个不同的atom,当atom... 阅读全文

posted @ 2010-08-04 10:11 废铁 阅读(1354) 评论(0) 推荐(1) 编辑