You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zookeeper.apache.org by "Benjamin Reed (JIRA)" <ji...@apache.org> on 2009/02/10 07:45:00 UTC

[jira] Created: (ZOOKEEPER-308) improve the atomic broadcast performance 3x

improve the atomic broadcast performance 3x
-------------------------------------------

                 Key: ZOOKEEPER-308
                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-308
             Project: Zookeeper
          Issue Type: Improvement
          Components: server
            Reporter: Benjamin Reed


We need a benchmark for zab, the atomic broadcast protocol of zookeeper. we can also do some small tweaks to make zab go much faster.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (ZOOKEEPER-308) improve the atomic broadcast performance 3x

Posted by "Patrick Hunt (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ZOOKEEPER-308?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Patrick Hunt closed ZOOKEEPER-308.
----------------------------------


closing as fixed in 3.2.0

> improve the atomic broadcast performance 3x
> -------------------------------------------
>
>                 Key: ZOOKEEPER-308
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-308
>             Project: Zookeeper
>          Issue Type: Improvement
>          Components: server
>            Reporter: Benjamin Reed
>            Assignee: Benjamin Reed
>             Fix For: 3.2.0
>
>         Attachments: dat.png, ZOOKEEPER-308.patch, ZOOKEEPER-308.patch, ZOOKEEPER-308.patch
>
>
> We need a benchmark for zab, the atomic broadcast protocol of zookeeper. we can also do some small tweaks to make zab go much faster.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (ZOOKEEPER-308) improve the atomic broadcast performance 3x

Posted by "Mahadev konar (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ZOOKEEPER-308?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mahadev konar updated ZOOKEEPER-308:
------------------------------------

    Attachment: ZOOKEEPER-308.patch

this patch has a minor indentation change.

> improve the atomic broadcast performance 3x
> -------------------------------------------
>
>                 Key: ZOOKEEPER-308
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-308
>             Project: Zookeeper
>          Issue Type: Improvement
>          Components: server
>            Reporter: Benjamin Reed
>            Assignee: Benjamin Reed
>         Attachments: dat.png, ZOOKEEPER-308.patch, ZOOKEEPER-308.patch, ZOOKEEPER-308.patch
>
>
> We need a benchmark for zab, the atomic broadcast protocol of zookeeper. we can also do some small tweaks to make zab go much faster.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (ZOOKEEPER-308) improve the atomic broadcast performance 3x

Posted by "Patrick Hunt (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ZOOKEEPER-308?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Patrick Hunt updated ZOOKEEPER-308:
-----------------------------------

    Fix Version/s: 3.2.0

somehow this slipped through w/o a fix version number and is only now being corrected - marking as fixed in 3.2.0

> improve the atomic broadcast performance 3x
> -------------------------------------------
>
>                 Key: ZOOKEEPER-308
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-308
>             Project: Zookeeper
>          Issue Type: Improvement
>          Components: server
>            Reporter: Benjamin Reed
>            Assignee: Benjamin Reed
>             Fix For: 3.2.0
>
>         Attachments: dat.png, ZOOKEEPER-308.patch, ZOOKEEPER-308.patch, ZOOKEEPER-308.patch
>
>
> We need a benchmark for zab, the atomic broadcast protocol of zookeeper. we can also do some small tweaks to make zab go much faster.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (ZOOKEEPER-308) improve the atomic broadcast performance 3x

Posted by "Mahadev konar (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ZOOKEEPER-308?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12674763#action_12674763 ] 

Mahadev konar commented on ZOOKEEPER-308:
-----------------------------------------

this is great!!! 
comments/questions on the patch -- 

- what is the usefulness of the change in FileTxnLog, the flush has been moved earlier i.e while flushing when rolling the logs. Is their some specific reason for it?
- looks the outstanding changes on gives us a sorted order of zxid.... is it possible to get rid of outstandingchanges assuming that if zxid is the first in the outstandingchanges queue then zxid +1 will be the next one? I dont have a strong opinion on it. Anyway the outstanding list should not use that much memory.
- what is the purpose of writePacket(*, boolean) in follower.java. Why do we need to an option on when to flush ?
- why is tcpNodelay an option? why is not it always set to true?
- leader.java (line 560) needs wrapping
- why is the Excpetion wrapped around to IOExcpetion in SerializeUtils.java? All the lines in the deserializeSnapshot can only throw IOExcpeiton? Why do we have to wrap around Exception?


> improve the atomic broadcast performance 3x
> -------------------------------------------
>
>                 Key: ZOOKEEPER-308
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-308
>             Project: Zookeeper
>          Issue Type: Improvement
>          Components: server
>            Reporter: Benjamin Reed
>         Attachments: dat.png, ZOOKEEPER-308.patch, ZOOKEEPER-308.patch
>
>
> We need a benchmark for zab, the atomic broadcast protocol of zookeeper. we can also do some small tweaks to make zab go much faster.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (ZOOKEEPER-308) improve the atomic broadcast performance 3x

Posted by "Hudson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ZOOKEEPER-308?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12675550#action_12675550 ] 

Hudson commented on ZOOKEEPER-308:
----------------------------------

Integrated in ZooKeeper-trunk #236 (See [http://hudson.zones.apache.org/hudson/job/ZooKeeper-trunk/236/])
    

> improve the atomic broadcast performance 3x
> -------------------------------------------
>
>                 Key: ZOOKEEPER-308
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-308
>             Project: Zookeeper
>          Issue Type: Improvement
>          Components: server
>            Reporter: Benjamin Reed
>            Assignee: Benjamin Reed
>         Attachments: dat.png, ZOOKEEPER-308.patch, ZOOKEEPER-308.patch, ZOOKEEPER-308.patch
>
>
> We need a benchmark for zab, the atomic broadcast protocol of zookeeper. we can also do some small tweaks to make zab go much faster.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (ZOOKEEPER-308) improve the atomic broadcast performance 3x

Posted by "Mahadev konar (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ZOOKEEPER-308?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12675091#action_12675091 ] 

Mahadev konar commented on ZOOKEEPER-308:
-----------------------------------------

ok ... 

so for 6) are you going to change it for this patch or do you want to do that later?



> improve the atomic broadcast performance 3x
> -------------------------------------------
>
>                 Key: ZOOKEEPER-308
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-308
>             Project: Zookeeper
>          Issue Type: Improvement
>          Components: server
>            Reporter: Benjamin Reed
>            Assignee: Benjamin Reed
>         Attachments: dat.png, ZOOKEEPER-308.patch, ZOOKEEPER-308.patch
>
>
> We need a benchmark for zab, the atomic broadcast protocol of zookeeper. we can also do some small tweaks to make zab go much faster.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (ZOOKEEPER-308) improve the atomic broadcast performance 3x

Posted by "Benjamin Reed (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ZOOKEEPER-308?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Benjamin Reed updated ZOOKEEPER-308:
------------------------------------

    Status: Patch Available  (was: Open)

> improve the atomic broadcast performance 3x
> -------------------------------------------
>
>                 Key: ZOOKEEPER-308
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-308
>             Project: Zookeeper
>          Issue Type: Improvement
>          Components: server
>            Reporter: Benjamin Reed
>         Attachments: dat.png, ZOOKEEPER-308.patch, ZOOKEEPER-308.patch
>
>
> We need a benchmark for zab, the atomic broadcast protocol of zookeeper. we can also do some small tweaks to make zab go much faster.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (ZOOKEEPER-308) improve the atomic broadcast performance 3x

Posted by "Benjamin Reed (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ZOOKEEPER-308?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12674826#action_12674826 ] 

Benjamin Reed commented on ZOOKEEPER-308:
-----------------------------------------

1) added buffering to the txnlog. because of this, when we go to roll the log, there still might be txns in memory that have not been flushed to the file, so i have to do the flush before the roll.
2) we still need outstanding changes for followers that start to sync up. we send them the outstanding changes.
3) i also added buffering to the writePacket(), i want to minimize flushing, and thus a system call, so i only flush when i have to.
4) the tcpNodelay option is really there for experimentation. we may want to turn in on based on different traffic patterns or network topologies, but probably not. if it is an option, we can easly test without have to recompile things.
6) i got the unreasonable length exception with a corrupt log. that exception is a runtime exception. perhaps i really should have changed that exception to be an IOException.

> improve the atomic broadcast performance 3x
> -------------------------------------------
>
>                 Key: ZOOKEEPER-308
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-308
>             Project: Zookeeper
>          Issue Type: Improvement
>          Components: server
>            Reporter: Benjamin Reed
>            Assignee: Benjamin Reed
>         Attachments: dat.png, ZOOKEEPER-308.patch, ZOOKEEPER-308.patch
>
>
> We need a benchmark for zab, the atomic broadcast protocol of zookeeper. we can also do some small tweaks to make zab go much faster.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (ZOOKEEPER-308) improve the atomic broadcast performance 3x

Posted by "Mahadev konar (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ZOOKEEPER-308?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mahadev konar reassigned ZOOKEEPER-308:
---------------------------------------

    Assignee: Benjamin Reed

> improve the atomic broadcast performance 3x
> -------------------------------------------
>
>                 Key: ZOOKEEPER-308
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-308
>             Project: Zookeeper
>          Issue Type: Improvement
>          Components: server
>            Reporter: Benjamin Reed
>            Assignee: Benjamin Reed
>         Attachments: dat.png, ZOOKEEPER-308.patch, ZOOKEEPER-308.patch
>
>
> We need a benchmark for zab, the atomic broadcast protocol of zookeeper. we can also do some small tweaks to make zab go much faster.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (ZOOKEEPER-308) improve the atomic broadcast performance 3x

Posted by "Benjamin Reed (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ZOOKEEPER-308?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Benjamin Reed updated ZOOKEEPER-308:
------------------------------------

    Attachment: dat.png

This graph shows the throughput of zab as the number of servers increase. before i started tweaking zab was running around 15K ops/second with 3 servers.

> improve the atomic broadcast performance 3x
> -------------------------------------------
>
>                 Key: ZOOKEEPER-308
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-308
>             Project: Zookeeper
>          Issue Type: Improvement
>          Components: server
>            Reporter: Benjamin Reed
>         Attachments: dat.png, ZOOKEEPER-308.patch
>
>
> We need a benchmark for zab, the atomic broadcast protocol of zookeeper. we can also do some small tweaks to make zab go much faster.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (ZOOKEEPER-308) improve the atomic broadcast performance 3x

Posted by "Benjamin Reed (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ZOOKEEPER-308?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Benjamin Reed updated ZOOKEEPER-308:
------------------------------------

    Attachment: ZOOKEEPER-308.patch

This patch adds the AtomicBroadcastBenchmark to show the throughput of just the atomic broadcast layer. It also has the following performance improvements: use a hashtable rather than list for outstanding requests, only flush the txnlog buffer we we absolutely have to, only flush to buffer for the tcp stream on the leader when there aren't pending requests

> improve the atomic broadcast performance 3x
> -------------------------------------------
>
>                 Key: ZOOKEEPER-308
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-308
>             Project: Zookeeper
>          Issue Type: Improvement
>          Components: server
>            Reporter: Benjamin Reed
>         Attachments: ZOOKEEPER-308.patch
>
>
> We need a benchmark for zab, the atomic broadcast protocol of zookeeper. we can also do some small tweaks to make zab go much faster.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (ZOOKEEPER-308) improve the atomic broadcast performance 3x

Posted by "Benjamin Reed (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ZOOKEEPER-308?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Benjamin Reed updated ZOOKEEPER-308:
------------------------------------

    Attachment: ZOOKEEPER-308.patch

This patch adds two key improvements to NIOServer and prep req processor: if nothing is queued for a connection when we try to send a buffer, we can try to send it right away to avoid the selector wakeup; and using a hashmap to lookup changes to a patch to reduce the load on the prep request processor.

> improve the atomic broadcast performance 3x
> -------------------------------------------
>
>                 Key: ZOOKEEPER-308
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-308
>             Project: Zookeeper
>          Issue Type: Improvement
>          Components: server
>            Reporter: Benjamin Reed
>         Attachments: dat.png, ZOOKEEPER-308.patch, ZOOKEEPER-308.patch
>
>
> We need a benchmark for zab, the atomic broadcast protocol of zookeeper. we can also do some small tweaks to make zab go much faster.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (ZOOKEEPER-308) improve the atomic broadcast performance 3x

Posted by "Mahadev konar (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ZOOKEEPER-308?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mahadev konar updated ZOOKEEPER-308:
------------------------------------

      Resolution: Fixed
    Hadoop Flags: [Reviewed]
          Status: Resolved  (was: Patch Available)

I just committed this. thank ben.

> improve the atomic broadcast performance 3x
> -------------------------------------------
>
>                 Key: ZOOKEEPER-308
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-308
>             Project: Zookeeper
>          Issue Type: Improvement
>          Components: server
>            Reporter: Benjamin Reed
>            Assignee: Benjamin Reed
>         Attachments: dat.png, ZOOKEEPER-308.patch, ZOOKEEPER-308.patch, ZOOKEEPER-308.patch
>
>
> We need a benchmark for zab, the atomic broadcast protocol of zookeeper. we can also do some small tweaks to make zab go much faster.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.