You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Alexander Shigin (JIRA)" <ji...@apache.org> on 2008/06/20 13:01:45 UTC
[jira] Created: (THRIFT-45) TNonblockingServer two packets instead
of one
TNonblockingServer two packets instead of one
---------------------------------------------
Key: THRIFT-45
URL: https://issues.apache.org/jira/browse/THRIFT-45
Project: Thrift
Issue Type: Improvement
Components: Library (C++)
Reporter: Alexander Shigin
Priority: Minor
TNonblockingServer creates two packets for each result: size of result and result data.
On a default FreeBSD (both 6.3 and 7.0) installation it causes a 100 ms slowdown (it tries to pack an ACK packet with a next packet, but the program waits for new input).
Attached patch merges these two packets into a single packet.
Here is the result. The svn version serves on 9090 port and the patched version on 9091:
$ python qx.py 9090 > /dev/null
time is 0.104
$ python qx.py 9091 > /dev/null
time is 0.006
I think high loaded thrift server can get some speed up even if it works on linux.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (THRIFT-45) TNonblockingServer two packets instead
of one
Posted by "Alexander Shigin (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/THRIFT-45?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Alexander Shigin updated THRIFT-45:
-----------------------------------
Attachment: thrift-svn-nonblocking-server-one-packet.patch
Attached patch works fine with async calls.
I removed older versions to avoid confusing.
> TNonblockingServer two packets instead of one
> ---------------------------------------------
>
> Key: THRIFT-45
> URL: https://issues.apache.org/jira/browse/THRIFT-45
> Project: Thrift
> Issue Type: Improvement
> Components: Library (C++)
> Reporter: Alexander Shigin
> Priority: Minor
> Attachments: nonblocking.diff, thrift-svn-nonblocking-server-one-packet.patch
>
>
> TNonblockingServer creates two packets for each result: size of result and result data.
> On a default FreeBSD (both 6.3 and 7.0) installation it causes a 100 ms slowdown (it tries to pack an ACK packet with a next packet, but the program waits for new input).
>
> Attached patch merges these two packets into a single packet.
> Here is the result. The svn version serves on 9090 port and the patched version on 9091:
> $ python qx.py 9090 > /dev/null
> time is 0.104
> $ python qx.py 9091 > /dev/null
> time is 0.006
> I think high loaded thrift server can get some speed up even if it works on linux.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (THRIFT-45) TNonblockingServer two packets
instead of one
Posted by "Alexander Shigin (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/THRIFT-45?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12609368#action_12609368 ]
Alexander Shigin commented on THRIFT-45:
----------------------------------------
David, I don't fell confident to write any comments if one is going to production code or version controll system (my english isn't so pretty). I'd happy if initial comment goes as a message or you can write one by your own.
> TNonblockingServer two packets instead of one
> ---------------------------------------------
>
> Key: THRIFT-45
> URL: https://issues.apache.org/jira/browse/THRIFT-45
> Project: Thrift
> Issue Type: Improvement
> Components: Library (C++)
> Reporter: Alexander Shigin
> Priority: Minor
> Attachments: nonblocking.diff, thrift-svn-nonblocking-server-one-packet.patch
>
>
> TNonblockingServer creates two packets for each result: size of result and result data.
> On a default FreeBSD (both 6.3 and 7.0) installation it causes a 100 ms slowdown (it tries to pack an ACK packet with a next packet, but the program waits for new input).
>
> Attached patch merges these two packets into a single packet.
> Here is the result. The svn version serves on 9090 port and the patched version on 9091:
> $ python qx.py 9090 > /dev/null
> time is 0.104
> $ python qx.py 9091 > /dev/null
> time is 0.006
> I think high loaded thrift server can get some speed up even if it works on linux.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (THRIFT-45) TNonblockingServer two packets instead
of one
Posted by "Alexander Shigin (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/THRIFT-45?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Alexander Shigin updated THRIFT-45:
-----------------------------------
Patch Info: [Patch Available]
> TNonblockingServer two packets instead of one
> ---------------------------------------------
>
> Key: THRIFT-45
> URL: https://issues.apache.org/jira/browse/THRIFT-45
> Project: Thrift
> Issue Type: Improvement
> Components: Library (C++)
> Reporter: Alexander Shigin
> Priority: Minor
> Attachments: thrift-svn-nonblocking-server-one-packet.diff
>
>
> TNonblockingServer creates two packets for each result: size of result and result data.
> On a default FreeBSD (both 6.3 and 7.0) installation it causes a 100 ms slowdown (it tries to pack an ACK packet with a next packet, but the program waits for new input).
>
> Attached patch merges these two packets into a single packet.
> Here is the result. The svn version serves on 9090 port and the patched version on 9091:
> $ python qx.py 9090 > /dev/null
> time is 0.104
> $ python qx.py 9091 > /dev/null
> time is 0.006
> I think high loaded thrift server can get some speed up even if it works on linux.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (THRIFT-45) TNonblockingServer two packets instead
of one
Posted by "Alexander Shigin (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/THRIFT-45?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Alexander Shigin updated THRIFT-45:
-----------------------------------
Attachment: thrift-svn-nonblocking-server-one-packet.diff
.
> TNonblockingServer two packets instead of one
> ---------------------------------------------
>
> Key: THRIFT-45
> URL: https://issues.apache.org/jira/browse/THRIFT-45
> Project: Thrift
> Issue Type: Improvement
> Components: Library (C++)
> Reporter: Alexander Shigin
> Priority: Minor
> Attachments: thrift-svn-nonblocking-server-one-packet.diff
>
>
> TNonblockingServer creates two packets for each result: size of result and result data.
> On a default FreeBSD (both 6.3 and 7.0) installation it causes a 100 ms slowdown (it tries to pack an ACK packet with a next packet, but the program waits for new input).
>
> Attached patch merges these two packets into a single packet.
> Here is the result. The svn version serves on 9090 port and the patched version on 9091:
> $ python qx.py 9090 > /dev/null
> time is 0.104
> $ python qx.py 9091 > /dev/null
> time is 0.006
> I think high loaded thrift server can get some speed up even if it works on linux.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (THRIFT-45) TNonblockingServer two packets instead
of one
Posted by "David Reiss (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/THRIFT-45?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
David Reiss updated THRIFT-45:
------------------------------
Attachment: nonblocking.diff
I just added one little comment about why we're doing the fake write of four bytes at the beginning. Any objections to this version?
Thanks for tackling this long-standing TODO item!
> TNonblockingServer two packets instead of one
> ---------------------------------------------
>
> Key: THRIFT-45
> URL: https://issues.apache.org/jira/browse/THRIFT-45
> Project: Thrift
> Issue Type: Improvement
> Components: Library (C++)
> Reporter: Alexander Shigin
> Priority: Minor
> Attachments: nonblocking.diff, thrift-svn-nonblocking-server-one-packet.diff
>
>
> TNonblockingServer creates two packets for each result: size of result and result data.
> On a default FreeBSD (both 6.3 and 7.0) installation it causes a 100 ms slowdown (it tries to pack an ACK packet with a next packet, but the program waits for new input).
>
> Attached patch merges these two packets into a single packet.
> Here is the result. The svn version serves on 9090 port and the patched version on 9091:
> $ python qx.py 9090 > /dev/null
> time is 0.104
> $ python qx.py 9091 > /dev/null
> time is 0.006
> I think high loaded thrift server can get some speed up even if it works on linux.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (THRIFT-45) TNonblockingServer two packets instead
of one
Posted by "David Reiss (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/THRIFT-45?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
David Reiss resolved THRIFT-45.
-------------------------------
Resolution: Fixed
Assignee: Alexander Shigin
> TNonblockingServer two packets instead of one
> ---------------------------------------------
>
> Key: THRIFT-45
> URL: https://issues.apache.org/jira/browse/THRIFT-45
> Project: Thrift
> Issue Type: Improvement
> Components: Library (C++)
> Reporter: Alexander Shigin
> Assignee: Alexander Shigin
> Priority: Minor
> Attachments: nonblocking.diff, thrift-svn-nonblocking-server-one-packet.patch
>
>
> TNonblockingServer creates two packets for each result: size of result and result data.
> On a default FreeBSD (both 6.3 and 7.0) installation it causes a 100 ms slowdown (it tries to pack an ACK packet with a next packet, but the program waits for new input).
>
> Attached patch merges these two packets into a single packet.
> Here is the result. The svn version serves on 9090 port and the patched version on 9091:
> $ python qx.py 9090 > /dev/null
> time is 0.104
> $ python qx.py 9091 > /dev/null
> time is 0.006
> I think high loaded thrift server can get some speed up even if it works on linux.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (THRIFT-45) TNonblockingServer two packets instead
of one
Posted by "Alexander Shigin (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/THRIFT-45?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Alexander Shigin updated THRIFT-45:
-----------------------------------
Attachment: (was: thrift-svn-nonblocking-server-one-packet-2.diff)
> TNonblockingServer two packets instead of one
> ---------------------------------------------
>
> Key: THRIFT-45
> URL: https://issues.apache.org/jira/browse/THRIFT-45
> Project: Thrift
> Issue Type: Improvement
> Components: Library (C++)
> Reporter: Alexander Shigin
> Priority: Minor
> Attachments: nonblocking.diff
>
>
> TNonblockingServer creates two packets for each result: size of result and result data.
> On a default FreeBSD (both 6.3 and 7.0) installation it causes a 100 ms slowdown (it tries to pack an ACK packet with a next packet, but the program waits for new input).
>
> Attached patch merges these two packets into a single packet.
> Here is the result. The svn version serves on 9090 port and the patched version on 9091:
> $ python qx.py 9090 > /dev/null
> time is 0.104
> $ python qx.py 9091 > /dev/null
> time is 0.006
> I think high loaded thrift server can get some speed up even if it works on linux.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (THRIFT-45) TNonblockingServer two packets
instead of one
Posted by "Alexander Shigin (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/THRIFT-45?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12607739#action_12607739 ]
Alexander Shigin commented on THRIFT-45:
----------------------------------------
The patch break async calls.
> TNonblockingServer two packets instead of one
> ---------------------------------------------
>
> Key: THRIFT-45
> URL: https://issues.apache.org/jira/browse/THRIFT-45
> Project: Thrift
> Issue Type: Improvement
> Components: Library (C++)
> Reporter: Alexander Shigin
> Priority: Minor
> Attachments: nonblocking.diff, thrift-svn-nonblocking-server-one-packet-2.diff, thrift-svn-nonblocking-server-one-packet.diff
>
>
> TNonblockingServer creates two packets for each result: size of result and result data.
> On a default FreeBSD (both 6.3 and 7.0) installation it causes a 100 ms slowdown (it tries to pack an ACK packet with a next packet, but the program waits for new input).
>
> Attached patch merges these two packets into a single packet.
> Here is the result. The svn version serves on 9090 port and the patched version on 9091:
> $ python qx.py 9090 > /dev/null
> time is 0.104
> $ python qx.py 9091 > /dev/null
> time is 0.006
> I think high loaded thrift server can get some speed up even if it works on linux.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (THRIFT-45) TNonblockingServer two packets instead
of one
Posted by "Alexander Shigin (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/THRIFT-45?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Alexander Shigin updated THRIFT-45:
-----------------------------------
Attachment: (was: thrift-svn-nonblocking-server-one-packet.diff)
> TNonblockingServer two packets instead of one
> ---------------------------------------------
>
> Key: THRIFT-45
> URL: https://issues.apache.org/jira/browse/THRIFT-45
> Project: Thrift
> Issue Type: Improvement
> Components: Library (C++)
> Reporter: Alexander Shigin
> Priority: Minor
> Attachments: nonblocking.diff
>
>
> TNonblockingServer creates two packets for each result: size of result and result data.
> On a default FreeBSD (both 6.3 and 7.0) installation it causes a 100 ms slowdown (it tries to pack an ACK packet with a next packet, but the program waits for new input).
>
> Attached patch merges these two packets into a single packet.
> Here is the result. The svn version serves on 9090 port and the patched version on 9091:
> $ python qx.py 9090 > /dev/null
> time is 0.104
> $ python qx.py 9091 > /dev/null
> time is 0.006
> I think high loaded thrift server can get some speed up even if it works on linux.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (THRIFT-45) TNonblockingServer two packets
instead of one
Posted by "David Reiss (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/THRIFT-45?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12609350#action_12609350 ]
David Reiss commented on THRIFT-45:
-----------------------------------
Nice catch. This looks good. Do you want to write the commit message for it?
> TNonblockingServer two packets instead of one
> ---------------------------------------------
>
> Key: THRIFT-45
> URL: https://issues.apache.org/jira/browse/THRIFT-45
> Project: Thrift
> Issue Type: Improvement
> Components: Library (C++)
> Reporter: Alexander Shigin
> Priority: Minor
> Attachments: nonblocking.diff, thrift-svn-nonblocking-server-one-packet.patch
>
>
> TNonblockingServer creates two packets for each result: size of result and result data.
> On a default FreeBSD (both 6.3 and 7.0) installation it causes a 100 ms slowdown (it tries to pack an ACK packet with a next packet, but the program waits for new input).
>
> Attached patch merges these two packets into a single packet.
> Here is the result. The svn version serves on 9090 port and the patched version on 9091:
> $ python qx.py 9090 > /dev/null
> time is 0.104
> $ python qx.py 9091 > /dev/null
> time is 0.006
> I think high loaded thrift server can get some speed up even if it works on linux.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (THRIFT-45) TNonblockingServer two packets instead
of one
Posted by "Alexander Shigin (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/THRIFT-45?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Alexander Shigin updated THRIFT-45:
-----------------------------------
Attachment: thrift-svn-nonblocking-server-one-packet-2.diff
I've got no objection, it's great idea to comment the fake write.
And it may be a good idea to make frameSize_ a local variable.
> TNonblockingServer two packets instead of one
> ---------------------------------------------
>
> Key: THRIFT-45
> URL: https://issues.apache.org/jira/browse/THRIFT-45
> Project: Thrift
> Issue Type: Improvement
> Components: Library (C++)
> Reporter: Alexander Shigin
> Priority: Minor
> Attachments: nonblocking.diff, thrift-svn-nonblocking-server-one-packet-2.diff, thrift-svn-nonblocking-server-one-packet.diff
>
>
> TNonblockingServer creates two packets for each result: size of result and result data.
> On a default FreeBSD (both 6.3 and 7.0) installation it causes a 100 ms slowdown (it tries to pack an ACK packet with a next packet, but the program waits for new input).
>
> Attached patch merges these two packets into a single packet.
> Here is the result. The svn version serves on 9090 port and the patched version on 9091:
> $ python qx.py 9090 > /dev/null
> time is 0.104
> $ python qx.py 9091 > /dev/null
> time is 0.006
> I think high loaded thrift server can get some speed up even if it works on linux.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.