You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by "Daniel John Debrunner (JIRA)" <ji...@apache.org> on 2007/02/22 21:53:05 UTC
[jira] Created: (DERBY-2369) NetworkServerControl.shutdown() takes
at least 1.5 seconds, could be faster.
NetworkServerControl.shutdown() takes at least 1.5 seconds, could be faster.
----------------------------------------------------------------------------
Key: DERBY-2369
URL: https://issues.apache.org/jira/browse/DERBY-2369
Project: Derby
Issue Type: Improvement
Components: Network Server, Performance
Reporter: Daniel John Debrunner
Assigned To: Daniel John Debrunner
Priority: Minor
Fix For: 10.3.0.0
The shutdown command takes at least 1.5 seconds, broken into two parts:
- 0.5 seconds is the first sleep after the shutdown request and before the first ping to see if the server is shutdown.
- ~1 second is the time trying to obtain a socket in order to perform the ping to see if the server is shutdown. This socket creation fails (correctly) but takes time to do so.
The socket creation time can be avoided by re-using the socket that was used to send the shutdown request.
The sleep time could be reduced by sleeping on a finer granularity, 0.5secs is a long time for a modern processor.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (DERBY-2369) NetworkServerControl.shutdown() takes
at least 1.5 seconds, could be faster.
Posted by "Daniel John Debrunner (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DERBY-2369?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Daniel John Debrunner updated DERBY-2369:
-----------------------------------------
Attachment: derby2369_reuse_socket.txt
derby2369_reuse_socket.txt
Patch that re-uses the socket used to send the shutdown request to perform the ping to see if the server is shutdown.
Also fixes a bug where the message if the server did not shutdown in time could never be seen.
Drops around a second off the shutdown time.
> NetworkServerControl.shutdown() takes at least 1.5 seconds, could be faster.
> ----------------------------------------------------------------------------
>
> Key: DERBY-2369
> URL: https://issues.apache.org/jira/browse/DERBY-2369
> Project: Derby
> Issue Type: Improvement
> Components: Network Server, Performance
> Reporter: Daniel John Debrunner
> Assigned To: Daniel John Debrunner
> Priority: Minor
> Fix For: 10.3.0.0
>
> Attachments: derby2369_reuse_socket.txt
>
>
> The shutdown command takes at least 1.5 seconds, broken into two parts:
> - 0.5 seconds is the first sleep after the shutdown request and before the first ping to see if the server is shutdown.
> - ~1 second is the time trying to obtain a socket in order to perform the ping to see if the server is shutdown. This socket creation fails (correctly) but takes time to do so.
> The socket creation time can be avoided by re-using the socket that was used to send the shutdown request.
> The sleep time could be reduced by sleeping on a finer granularity, 0.5secs is a long time for a modern processor.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (DERBY-2369) NetworkServerControl.shutdown()
takes at least 1.5 seconds, could be faster.
Posted by "Knut Anders Hatlen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DERBY-2369?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12475290 ]
Knut Anders Hatlen commented on DERBY-2369:
-------------------------------------------
The patch looks good. +1 to commit if the tests pass. One minor comment: I think "// as soon as we can't ping return" shouldn't have been moved out of the catch block since it refers to the break statement.
I assume the numbers you reported were seen on Windows? I didn't see any change in the time it took to shut down the server on Solaris (~1 second both with and without the patch), but it's a good change anyway.
> NetworkServerControl.shutdown() takes at least 1.5 seconds, could be faster.
> ----------------------------------------------------------------------------
>
> Key: DERBY-2369
> URL: https://issues.apache.org/jira/browse/DERBY-2369
> Project: Derby
> Issue Type: Improvement
> Components: Network Server, Performance
> Reporter: Daniel John Debrunner
> Assigned To: Daniel John Debrunner
> Priority: Minor
> Fix For: 10.3.0.0
>
> Attachments: derby2369_reuse_socket.txt
>
>
> The shutdown command takes at least 1.5 seconds, broken into two parts:
> - 0.5 seconds is the first sleep after the shutdown request and before the first ping to see if the server is shutdown.
> - ~1 second is the time trying to obtain a socket in order to perform the ping to see if the server is shutdown. This socket creation fails (correctly) but takes time to do so.
> The socket creation time can be avoided by re-using the socket that was used to send the shutdown request.
> The sleep time could be reduced by sleeping on a finer granularity, 0.5secs is a long time for a modern processor.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (DERBY-2369) NetworkServerControl.shutdown() takes
at least 1.5 seconds, could be faster.
Posted by "Daniel John Debrunner (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DERBY-2369?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Daniel John Debrunner updated DERBY-2369:
-----------------------------------------
Derby Info: [Patch Available]
> NetworkServerControl.shutdown() takes at least 1.5 seconds, could be faster.
> ----------------------------------------------------------------------------
>
> Key: DERBY-2369
> URL: https://issues.apache.org/jira/browse/DERBY-2369
> Project: Derby
> Issue Type: Improvement
> Components: Network Server, Performance
> Reporter: Daniel John Debrunner
> Assigned To: Daniel John Debrunner
> Priority: Minor
> Fix For: 10.3.0.0
>
> Attachments: derby2369_reuse_socket.txt
>
>
> The shutdown command takes at least 1.5 seconds, broken into two parts:
> - 0.5 seconds is the first sleep after the shutdown request and before the first ping to see if the server is shutdown.
> - ~1 second is the time trying to obtain a socket in order to perform the ping to see if the server is shutdown. This socket creation fails (correctly) but takes time to do so.
> The socket creation time can be avoided by re-using the socket that was used to send the shutdown request.
> The sleep time could be reduced by sleeping on a finer granularity, 0.5secs is a long time for a modern processor.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (DERBY-2369) NetworkServerControl.shutdown() takes
at least 1.5 seconds, could be faster.
Posted by "Dag H. Wanvik (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DERBY-2369?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Dag H. Wanvik updated DERBY-2369:
---------------------------------
Derby Categories: [Performance]
> NetworkServerControl.shutdown() takes at least 1.5 seconds, could be faster.
> ----------------------------------------------------------------------------
>
> Key: DERBY-2369
> URL: https://issues.apache.org/jira/browse/DERBY-2369
> Project: Derby
> Issue Type: Improvement
> Components: Network Server
> Reporter: Daniel John Debrunner
> Assignee: Daniel John Debrunner
> Priority: Minor
> Fix For: 10.3.1.4
>
> Attachments: derby2369_reuse_socket.txt
>
>
> The shutdown command takes at least 1.5 seconds, broken into two parts:
> - 0.5 seconds is the first sleep after the shutdown request and before the first ping to see if the server is shutdown.
> - ~1 second is the time trying to obtain a socket in order to perform the ping to see if the server is shutdown. This socket creation fails (correctly) but takes time to do so.
> The socket creation time can be avoided by re-using the socket that was used to send the shutdown request.
> The sleep time could be reduced by sleeping on a finer granularity, 0.5secs is a long time for a modern processor.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (DERBY-2369) NetworkServerControl.shutdown()
takes at least 1.5 seconds, could be faster.
Posted by "Daniel John Debrunner (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DERBY-2369?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12475350 ]
Daniel John Debrunner commented on DERBY-2369:
----------------------------------------------
Thanks for the comment Knut Anders. yes i was running on windows. The patch doesn't include the second change to reduce the sleep time, that should decrease the time on Solaris.
> NetworkServerControl.shutdown() takes at least 1.5 seconds, could be faster.
> ----------------------------------------------------------------------------
>
> Key: DERBY-2369
> URL: https://issues.apache.org/jira/browse/DERBY-2369
> Project: Derby
> Issue Type: Improvement
> Components: Network Server, Performance
> Reporter: Daniel John Debrunner
> Assigned To: Daniel John Debrunner
> Priority: Minor
> Fix For: 10.3.0.0
>
> Attachments: derby2369_reuse_socket.txt
>
>
> The shutdown command takes at least 1.5 seconds, broken into two parts:
> - 0.5 seconds is the first sleep after the shutdown request and before the first ping to see if the server is shutdown.
> - ~1 second is the time trying to obtain a socket in order to perform the ping to see if the server is shutdown. This socket creation fails (correctly) but takes time to do so.
> The socket creation time can be avoided by re-using the socket that was used to send the shutdown request.
> The sleep time could be reduced by sleeping on a finer granularity, 0.5secs is a long time for a modern processor.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Closed: (DERBY-2369) NetworkServerControl.shutdown() takes
at least 1.5 seconds, could be faster.
Posted by "Daniel John Debrunner (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DERBY-2369?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Daniel John Debrunner closed DERBY-2369.
----------------------------------------
Resolution: Fixed
Committed revision 511353
> NetworkServerControl.shutdown() takes at least 1.5 seconds, could be faster.
> ----------------------------------------------------------------------------
>
> Key: DERBY-2369
> URL: https://issues.apache.org/jira/browse/DERBY-2369
> Project: Derby
> Issue Type: Improvement
> Components: Network Server, Performance
> Reporter: Daniel John Debrunner
> Assigned To: Daniel John Debrunner
> Priority: Minor
> Fix For: 10.3.0.0
>
> Attachments: derby2369_reuse_socket.txt
>
>
> The shutdown command takes at least 1.5 seconds, broken into two parts:
> - 0.5 seconds is the first sleep after the shutdown request and before the first ping to see if the server is shutdown.
> - ~1 second is the time trying to obtain a socket in order to perform the ping to see if the server is shutdown. This socket creation fails (correctly) but takes time to do so.
> The socket creation time can be avoided by re-using the socket that was used to send the shutdown request.
> The sleep time could be reduced by sleeping on a finer granularity, 0.5secs is a long time for a modern processor.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.