通常而言我们的kafka的配置如下所示: broker.id=0
num.network.threads=2
num.io.threads=8
socket.send.buffer.bytes=1048576
socket.receive.buffer.bytes=1048576
socket.request.max.bytes=1...
分类:
其他好文 时间:
2014-09-12 17:29:24
阅读次数:
215
是一个ClientSocketChannelFactory 的实现,基于SocketChannel的阻塞方式的客户端通道。使用的是传统的阻塞IO API,特点是能得到好的吞吐量和低延迟,当需要服务的连接数少的时候。(联系NIO和OIO的区别)
在OioClientSocketChannelFactory中只有一种线程类型,worker threads。每个连接的通道有一个专用的...
分类:
Web程序 时间:
2014-09-11 15:26:32
阅读次数:
305
在以前有关使用 acl 的技术文章(如:使用 acl::master_threads 类编写多进程多线程服务器程序?,用 acl::master_aio 类编写高并发非阻塞服务器程序,使用 acl::master_proc 类编写多进程服务器程序)中...
分类:
其他好文 时间:
2014-09-03 13:22:46
阅读次数:
202
Cursor draftCursor = mResolver.query(Uri.parse("content://sms"), new String[] {"canonical_addresses.address " + "from sms,threads,canonical_ad...
分类:
移动开发 时间:
2014-09-01 17:34:33
阅读次数:
273
这两天在写这篇blog的时候,顺带复习操作系统的资料,遇到了一个之前没有弄明白的问题,就是关于内核级线程与用户级线程。在查阅了一些资料之后,发表一下我个人简介。 线程已经在许多系统中实现,到那时各个操作系统实现方式不完全相同。 比如在有的系统中,特倍是一些数据库管理系统如IBM的infomix系统,所实现的用户级线程(UserLevel Threads ,ULT);而另一些系统如(Mac os的前...
分类:
编程语言 时间:
2014-09-01 10:48:03
阅读次数:
261
官网上给出的例子http://nikhilm.github.io/uvbook/threads.html#inter-thread-communication,中文理解在后边Inter-thread communicationSometimes you want various threads to...
分类:
编程语言 时间:
2014-08-29 17:55:18
阅读次数:
2927
没有人告诉我这个事实:When theconstructor exits, the values offinalfields areguaranteed to be visibleto other threads accessing the constructed object.还有一个教训就是:要...
分类:
其他好文 时间:
2014-08-26 19:37:26
阅读次数:
162
Non-blocking algorithm
In computer science, a non-blocking algorithm ensures that threads competing
for a shared resource do not have their execution indefinitely
postponed by mutual ex...
分类:
其他好文 时间:
2014-08-26 09:52:09
阅读次数:
270
1.show status like ‘max‘; ?? Threads_connected? 当前的连接数 ?? Connections? 试图连接到(不管是否成功)MySQL服务器的连接数。 ?? Max_used_connections? 服务器启动后已经同时使用的连接的最大数量...
分类:
数据库 时间:
2014-08-22 14:40:09
阅读次数:
156