用户操作
[留言]  [发消息]  [加为好友] 
订阅我的博客
XML聚合    FeedSky
订阅到鲜果
订阅到Google
订阅到抓虾
cnhome的公告
文章分类
.Net
Blog
我的网络空间
GIS
google的世界照片
mapguide开发者网络
mapguide开源
OpenNMS
OpenNMS商业网站
OpenNMS管方网站
OpenNMS配置文档
SOA
windows
windows脚本中心脚本库
编程
C++参考(英文)
J道论坛
wxWidgets_Cross-Platform GUI Library
并行化
google自动翻译的 hadoop 0.20中文文档
Hadoop文档 0.17 中文文档
Hadoop文档 0.18 中文文档
Intel TBB Open Source
intel并行视频系列
lam-mpi
open-mpi
开源软件
drupal
EJABBERD
gSOAP
Hadoop(huihoo的介绍)
hadoop(管方英文)
huihoo
huihoo(wiki)
IGNITE REALTIME
OpenLaszlo
SF
SF月度奖清单
免费网络时间服务器地址
网络工具
其他应用
2007中国城市竞争力报告
fisheye的主站
freeNAS中文网
freeNAS安装视频
Google Web Toolkit (GWT)
IT 168存储学院
TOM硬件咨讯(英文)
中国虚拟化先锋论坛
南方周末
多特软件站
虚拟机之家
霏凡软件
数据仓库
数据库
MySQL 5.1参考手册
算法
中间件
ACE 5.6文档
ACE_TAO(huihoo资料)
ICE开源中间件
存档

转载  How many clients can IceStorm support? 收藏

How many clients can IceStorm support?

转自http://zeroc.com/blogs/matthew/2008/08/20/how-many-clients-can-icestorm-support/

… or how long is a piece of string?

From an IceStorm perspective, there are two types of clients:

  • Publishers: Clients that publish messages to topics.
  • Subscribers: Servers that receive messages from a topic.

The exact number of supported publishers and subscribers depends on the total load imposed by them. Load is composed of several factors.

The first is message throughput, expressed as events per second (EPS). Message throughput is a function of latency and the total number of raw messages sent. By way of example:

  • You have 1 publisher publishing 1 EPS to 1 subscriber: throughput is 1 EPS.
  • You have 1 publisher publishing 10 EPS to 1 subscriber: throughput is 10 EPS.
  • You have 1 publisher publishing 10 EPS to 10 subscribers: throughput is 100 EPS.
  • You have 10 publishers publishing 10 EPS to 10 subscribers: throughput is 1000 EPS.

The second factor that influences load is message size. By multiplying EPS with message size, you can roughly determine the amount of bandwidth IceStorm will consume.

Bigger events also mean that IceStorm’s memory consumption will increase. However, memory use is not a primarily a function of the number of subscribers, but a function of the number of publishers and the number of events that are queued for subscribers. A single event published to one subscriber will only consume marginally less memory than a single event that is published to one hundred subscribers. This is because the memory allocated to an event is shared among all subscribers. Each subscriber has a separate event queue that points at the event, so queuing an event for an additional subscriber only consumes memory to store a pointer to the event in the queue, not memory to store an extra copy of the event.

IceStorm provides four quality-of-service modes for event delivery: oneway, twoway, twoway-ordered, and batched. Of these, oneway is fastest, followed by twoway, and then twoway-ordered. In particular, oneway events (if you can live with the limitations imposed by them) provide a big increase in EPS. For high-latency networks, you can also set batch delivery, which increases overall throughput by combining several events into a single physical protocol message. The cost is that events arrive at subscribers in bursts, and the bursts are separated by longer gaps than for unbatched delivery. For low-latency networks, batching does not provide any benefits. (See Ice Manual for more information on batch delivery.)

The best way to determine IceStorm’s maximum raw throughput is to run a latency test for the delivery mode you intend to use. For example, if you intend to use twoway delivery, run the C++ version of the twoway latency demo on your machine (see cpp/demo/Ice/latency). This demo measures the latency of sending twoway messages on a single machine. On one of my dual-core machines, the latency demo measures 0.149ms per message, which works out to 6,716 twoway messages per second. If you have more than two cores, you will achieve higher throughput (but throughput will not increase linearly with the number of cores).

To get a feel for the maximum bandwidth, you can run the C++ throughput demo (cpp/demo/Ice/throughput). Of course, this demo does not take into account the physical bandwidth limitations imposed by your network because client and server communicate over the loopback interface. However, you can also run the throughput client and server on separate machines to see how your network affects bandwidth.

To get optimum throughput from IceStorm for your application, you will need to play with the IceStorm configuration settings. The main setting you will be concerned with is the number of threads in the publishing thread pool. This setting determines how many events can concurrently be received and published. (Note that, if you are publishing messages to IceStorm with a oneway proxy and also require strict event ordering, you cannot configure more than one thread in the IceStorm thread pool.)

A good starting point for the thread pool size is to set the size equivalent to the number of cores on your IceStorm host. For example, assuming the name of the service is IceStorm, and IceStorm runs on a four-core machine, define the following:

IceStorm.Publish.ThreadPool.Size=4

As you can see, the question of how many clients IceStorm can support cannot be answered in isolation. To obtain a realistic estimate, you have to understand the application structure, the load imposed on IceStorm, the network and bandwidth restrictions, as well as the hardware on which IceStorm executes. Running benchmarks in an environment that resembles the deployment configuration as closely as possible is the best way to determine the total possible load that can be supported. The general guidelines I’ve outlined above should point you in the right direction.

发表于 @ 2009年03月24日 16:15:00 | 评论( loading... ) | 编辑| 举报| 收藏

旧一篇:(转)理解FastCGI应用的性能  | 新一篇:Hibernate之Criteria 基本查询

  • 发表评论
  • 评论内容:
  •  
Copyright © cnhome
Powered by CSDN Blog