搜索结果之于 [ disruptor ] - 51 条

理解Storm的内部消息缓冲机制

原文链接 作者:Michael G. Noll  译者:lendo

这篇文章是Apache Kafka的作者之一Michael G. Noll写的,他的博客地址在[这里]

优化Storm计算拓扑性能的过程有助于我们理解Storm内部消息队列的配置和使用,在这篇简短的文章中,我将向大家解释并说明Storm(0.8或0.9版本)的一个工作进程(worker process)和与其相关的多个执行器线程是如何完成内部通信的。

阅读全文

Apache Storm 官方文档 —— 问题与解决

原文链接    译者:魏勇

本文介绍了用户在使用 Storm 过程中遇到的问题与相应的解决方法。

阅读全文

并发编程网线下沙龙

今天下午正式举行,感谢各位的支持!

沙龙背景

马上就是并发编程网(ifeve.com)三岁生日了,首先感谢各位读者粉丝对我们的大力支持和鼓励!三年来,我们共组织翻译了600余篇文章,其中DisruptorNIONettyStorm并发编程JSR133Doug Lea并发论文等系列文章均得到了官方和读者的认可和好评。欣喜于取得如此成绩的同时,更让我们觉得在创造精品文章的路上,我们还有很长的路要走,我们一直在努力!

在三周年到来之际,并发编程网联合Coding.net七牛GreenTeaJUG举办第一场线下沙龙,主题是“并发编程”,号召对并发编程感兴趣的粉丝汇聚一堂,认我们煮酒论“编程”!

阅读全文

并发网2014.7月阅读量Top10

QQ图片20140830203041也许每天大家都在匆忙的工作,学习的时间非常短暂,也许网站的内容太多,不知道应该看哪一篇。所以从本月开始会向各位推送并发网每月Top10的阅读量的文章,希望各位能喜欢!有任何意见和建议,欢迎告诉我们,小编一定尽力满足各位。

Netty是一个提供异步事件驱动的网络应用框架,用以快速开发高性能、高可靠性的网络服务器和客户端程序。

换句话说,Netty是一个NIO框架,使用它可以简单快速地开发网络应用程序,比如客户端和服务端的协议。Netty大大简化了网络程序的开发过程比如TCP和UDP的 Socket的开发……(4,443 人阅读)

阅读全文

并发网系列文章集

本文列出了并发编程网站上的所有系列文章,方便大家阅读

JAVA:

Java ByteCode

Java Virtual Machine

阅读全文

AtomicLong.lazySet是如何工作的?

原文链接  译者:孙文强

Jackson Davis说:
为一个AtomicLong对象设置一个值,jvm会确保其他线程读取到最新值,原子类和voliatile变量也是一样的,这是由依赖于硬件的系统指令(如x86的xchg)实现的。lazySet却是无法保证这一点的方法,所以其他线程在之后的一小段时间里还是可以读到旧的值。

这有什么好处呢?

性能:在多核处理器下,内存以及cpu缓存的读和写常常是顺序执行的,所以在多个cpu缓存之间同步一个内存值的代价是很昂贵的。 阅读全文

并发编程网站推荐

并发编程网站

  1. Thread newsgroup(很多多线程相关的问题)
  2. preshing
  3. Doug Lea workstation (并发编程大师Doug lea的个人网站)
  4. Concurrency mail list  (Doug lea搞的邮件列表)
  5. oracle dave  (oracle 并发编程小组成员)
  6. lycog.com
  7. edu papers (很多并发编程相关的论文)
  8. oracle concurrency (oracle网站)
  9. mechanical-sympathy(需要翻墙,主要分享如何利用硬件的特性来实现高性能编程)
  10. Quora concurrency (quora问答网站的并发问题讨论)
  11. stackoverflow concurrency(stackoverflow问答网站的并发问题讨论)
  12. developerworks concurrency(并发编程专题文章)
  13. tumblr concurrency (涵盖多个语言的并发相关文章)
  14. JDK concurrent(官方jdk1.6 concurrent包API中文文档)
  15. trans-memory (研究内存事务的网站)

阅读全文

Further Adventures With CAS Instructions And Micro Benchmarking

原文地址:http://mechanical-sympathy.blogspot.com/2013/01/further-adventures-with-cas.html

In a previous article I reported what appeared to be a performance issue with CAS/LOCK instructions on the Sandy Bridge microarchitecture compared to the previous Nehalem microarchitecture.  Since then I’ve worked with the good people of Intel to understand what was going on and I’m now pleased to be able to shine some light on the previous results.

I observed a small drop in throughput with the uncontended single-thread case, and an order-of-magnitude decrease in throughput once multiple threads contend when performing updates.  This testing spawned out of observations testing Java Queue implementations and the Disruptor for the multi-producer case.  I was initially puzzled by these findings because almost every other performance test I applied to Sandy Bridge indicated a major step forward for this microarchitecture. 阅读全文

Inter Thread Latency

原文地址:http://mechanical-sympathy.blogspot.com/2011/08/inter-thread-latency.html (移到墙内)

Message rates between threads are fundamentally determined by the latency of memory exchange between CPU cores.   The minimum unit of transfer will be a cache line exchanged via shared caches or socket interconnects.  In a previous article I explained Memory Barriers and why they are important to concurrent programming between threads.  These are the instructions that cause a CPU to make memory visible to other cores in an ordered and timely manner. 阅读全文

内存屏障

原文地址  作者:  译者:一粟   校对:无叶,方腾飞

本文我将和大家讨论并发编程中最基础的一项技术:内存屏障或内存栅栏,也就是让一个CPU处理单元中的内存状态对其它处理单元可见的一项技术。

CPU使用了很多优化技术来实现一个目标:CPU执行单元的速度要远超主存访问速度。在上一篇文章 “Write Combing (合并写)”中我已经介绍了其中的一项技术。CPU避免内存访问延迟最常见的技术是将指令管道化,然后尽量重排这些管道的执行以最大化利用缓存,从而把因为缓存未命中引起的延迟降到最小。

当一个程序执行时,只要最终的结果是一样的,指令是否被重排并不重要。例如,在一个循环里,如果循环体内没用到这个计数器,循环的计数器什么时候更新(在循环开始,中间还是最后)并不重要。编译器和CPU可以自由的重排指令以最佳的利用CPU,只要下一次循环前更新该计数器即可。并且在循环执行中,这个变量可能一直存在寄存器上,并没有被推到缓存或主存,这样这个变量对其他CPU来说一直都是不可见的。 阅读全文

从Java视角理解系统结构(三)伪共享

从Java视角理解系统结构连载, 关注我的微博(链接)了解最新动态

从我的前一篇博文中, 我们知道了CPU缓存及缓存行的概念, 同时用一个例子说明了编写单线程Java代码时应该注意的问题. 下面我们讨论更为复杂, 而且更符合现实情况的多核编程时将会碰到的问题. 这些问题更容易犯, 连j.u.c包作者Doug Lea大师的JDK代码里也存在这些问题.

MESI协议及RFO请求
前一篇我们知道, 典型的CPU微架构有3级缓存, 每个核都有自己私有的L1, L2缓存. 那么多线程编程时, 另外一个核的线程想要访问当前核内L1, L2 缓存行的数据, 该怎么办呢?
有人说可以通过第2个核直接访问第1个核的缓存行. 这是可行的, 但这种方法不够快. 跨核访问需要通过Memory Controller(见上一篇的示意图), 典型的情况是第2个核经常访问第1个核的这条数据, 那么每次都有跨核的消耗. 更糟的情况是, 有可能第2个核与第1个核不在一个插槽内.况且Memory Controller的总线带宽是有限的, 扛不住这么多数据传输. 所以, CPU设计者们更偏向于另一种办法: 如果第2个核需要这份数据, 由第1个核直接把数据内容发过去, 数据只需要传一次。

阅读全文

Memory Barriers/Fences

原文地址:http://mechanical-sympathy.blogspot.com/2011/07/memory-barriersfences.html(因墙转载)

In this article I’ll discuss the most fundamental technique in concurrent programming known as memory barriers, or fences, that make the memory state within a processor visible to other processors.

CPUs have employed many techniques to try and accommodate the fact that CPU execution unit performance has greatly outpaced main memory performance.  In my “Write Combining” article I touched on just one of these techniques.  The most common technique employed by CPUs to hide memory latency is to pipeline instructions and then spend significant effort, and resource, on trying to re-order these pipelines to minimise stalls related to cache misses.

When a program is executed it does not matter if its instructions are re-ordered provided the same end result is achieved.  For example, within a loop it does not matter when the loop counter is updated if no operation within the loop uses it.  The compiler and CPU are free to re-order the instructions to best utilise the CPU provided it is updated by the time the next iteration is about to commence.  Also over the execution of a loop this variable may be stored in a register and never pushed out to cache or main memory, thus it is never visible to another CPU. 阅读全文

Sharing Data Among Threads Without Contention

原文地址:http://www.oraclejavamagazine-digital.com/javamagazine/20120304/?pg=56&pm=1&u1=friend  作者 Trisha

The London Multi-Asset Exchange (LMAX) Disruptor is an open source concurrency framework that recently won the 2011 Duke’s Choice Award for Innovative Programming Framework. In this article, I use diagrams to describe what the Disruptor is; what it does; and, to some extent, how it works.

阅读全文

线程间共享数据无需竞争

原文 地址  作者  Trisha   译者:李同杰

LMAX Disruptor 是一个开源的并发框架,并获得2011 Duke’s 程序框架创新奖。本文将用图表的方式为大家介绍Disruptor是什么,用来做什么,以及简单介绍背后的实现原理。

Disruptor是什么?

Disruptor 是线程内通信框架,用于线程里共享数据。LMAX 创建Disruptor作为可靠消息架构的一部分并将它设计成一种在不同组件中共享数据非常快的方法。
基于Mechanical Sympathy(对于计算机底层硬件的理解),基本的计算机科学以及领域驱动设计,Disruptor已经发展成为一个帮助开发人员解决很多繁琐并发编程问题的框架。
很多架构都普遍使用一个队列共享线程间的数据(即传送消息)。图1 展示了一个在不同的阶段中通过使用队列来传送消息的例子(每个蓝色的圈代表一个线程)。 阅读全文

Java 7与伪共享的新仇旧恨

原文:False Shareing && Java 7 (依然是马丁的博客)  译者:杨帆 校对:方腾飞

在我前一篇有关伪共享的博文中,我提到了可以加入闲置的long字段来填充缓存行来避免伪共享。但是看起来Java 7变得更加智慧了,它淘汰或者是重新排列了无用的字段,这样我们之前的办法在Java 7下就不奏效了,但是伪共享依然会发生。我在不同的平台上实验了一些列不同的方案,并且最终发现下面的代码是最可靠的。(译者注:下面的是最终版本,马丁在大家的帮助下修改了几次代码) 阅读全文

return top