达到Apache Storm的极限(Reaching limits of Apache Storm)
我们正在尝试使用
Apache Storm
实现Web应用程序。应用
收到大量的广告请求(100 TPS
- 一百次交易/秒),
然后对它们做一些简单的计算
将结果存储在NoSQL数据库中
最大延迟为10毫秒 。我们正在使用
Cassandra
作为其写作功能的接收器。但是,我们已经超过了
8 ms
要求,我们在100ms
。我们尝试使用螺栓的并行性来最小化缓冲区(Disruptor缓冲区)的大小并平衡拓扑。
但我们仍然在
20ms
。有4名工作人员(8核/ 16GB),我们的
20k TPS
为20k TPS
,仍然非常低。是否有任何优化建议或
我们刚刚达到Apache Storm
的极限Apache Storm
(Java
限制)?We are trying to implement a web application with
Apache Storm
.Application
receives a huge load of ad-requests (100 TPS
- a hundred transactions / second ),
makes some simple calculation on them and then
stores the result in a NoSQL database
with a maximum latency of 10 ms.We are using
Cassandra
as a sink for its writing capabilities.However, we have already overpassed the
8 ms
requirement, we are in100ms
.We tried to minimize the size of buffers (Disruptor buffers) and to well balance the topology, using the parallelism of bolts.
But we still in
20ms
.With 4 worker ( 8 cores / 16GB ) we are at
20k TPS
which is still very low.Is there any suggestions for optimization or
are we just reaching the limits ofApache Storm
(limits ofJava
)?
原文:https://stackoverflow.com/questions/31336126
最满意答案
您必须访问ColumnStyles集合的索引:
With TableLayoutPanel1.ColumnStyles(1) .SizeType = SizeType.Absolute .Width = 32 End With
如果您尝试设置单行的宽度,那么除非您使用
SetColumnSpan
跨列来使多列成为单个列,否则这种情况确实无法实现。 这需要将控件放置在单元内。You would have to access the index of the ColumnStyles collection:
With TableLayoutPanel1.ColumnStyles(1) .SizeType = SizeType.Absolute .Width = 32 End With
If you are trying to set the width of a single row, then that really isn't possible unless you span the column using
SetColumnSpan
to make multiple columns into a single column. That requires a control to be placed inside the cell.
相关问答
更多-
好的,所以我认为嵌套的GroupBox / UserControl-GroupBox的想法是出错的地方。 我已通过更新原始表单来解决此问题,以执行以下操作: pnlLorries.Controls.Clear(); DateTime dt_start = monthView1.SelectionStart; DateTime dt_end = monthView1.SelectionEnd; int rowCounter = 0; for (DateTime dt = dt_start; ...
-
对于每个红色面板,将Anchor属性设置为None。 这将导致红色面板在其单元格中居中。 只要您的列设置为20%的宽度,它应该按照您描述的方式工作。 我做到了,得到了下面的结果。 For each of your red panels, set the Anchor property to None. This will cause the red panel to be centered within its cell. As long as your columns are set to a width ...
-
仅在单元格动态填充时调整TableLayoutPanel行的大小(Resize TableLayoutPanel rows only as cells are dynamically populated)[2022-06-12]
添加degreePanel.Dock = DockStyle.Fill Add degreePanel.Dock = DockStyle.Fill -
没关系,我意识到TableLayoutPanel的边框设置是“Inset”,所以看起来好像有空格。 将其更改为“单一”修复了该问题。 Never mind, I realised that the TableLayoutPanel's border setting was "Inset", so it appeared as though there was whitespace. Changing it to "Single" fixed the issue.
-
这些属性只存在于属性窗口中,由IExtenderProvider接口提供魔术。 它们在运行时不存在。 扩展属性是: ColumnSpan。 运行时:GetColumnSpan()和SetColumnSpan() 行跨度。 运行时:GetRowSpan()和SetRowSpan() 行。 运行时:GetRow()和SetRow() 细胞。 运行时:GetCellPosition()和SetCellPosition() 柱。 运行时:GetColumn()和SetColumn() 显然,TLP是高度优化的,可供 ...
-
您必须访问ColumnStyles集合的索引: With TableLayoutPanel1.ColumnStyles(1) .SizeType = SizeType.Absolute .Width = 32 End With 如果您尝试设置单行的宽度,那么除非您使用SetColumnSpan跨列来使多列成为单个列,否则这种情况确实无法实现。 这需要将控件放置在单元内。 You would have to access the index of the ColumnStyles collectio ...
-
要在设计器中执行此操作,您需要使用第三个空行,假设您要交换第1行和第2行。 添加一个空行3。 从第1行>第3行移动控件 从第2行>第1行移动控件 从第3行>第1行移动控件 删除第3行 是的,这是一种解决方法,但它完成了工作。 或者,您可以在designer.cs文件中更改代码。 在那里你可以改变以下内容: this.myTableLayout.Controls.Add(this.myLabel1, 0, 0);//Change the order of these items. this.myTableLa ...
-
我不会说有更好的方法,除了你的代码有一些缺陷。 你可以依靠Linq来使它更简洁,但这可能不够优雅,而且可读性较差,而且根本不可调试,因为你不应该使用太多的Linq做这种事情(我个人喜欢它! )。 您应该对现有代码执行以下操作: private void RemoveEmptyRows() { for (int row = tablePanel.RowCount -1; row >= 0; row--) { bool hasControl = false; fo ...
-
创建一个List(Of List(Of Control)) ,然后可能使用TypeOf根据它实际的控件进行选择。 例如: If TypeOf ctl Is ComboBox Then AddHandler CType(ctl, ComboBox).SelectedIndexChanged, AddressOf Handler1 ElseIf TypeOf ctl Is TextBox Then AddHandler CType(ctl, TextBox).TextChanged, Address ...
-
看看“Control.SetBoundsCore”是否可以帮到你。 您必须创建自己的面板才能使用它。 看来您的问题的原因是遵循代码行 this.tableLayoutPanel2.Dock = System.Windows.Forms.DockStyle.Fill; See if "Control.SetBoundsCore" can help you. You will have to create your own panel to use it then. It seems the reason o ...