New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rewritten in python without cache functionality #7
Conversation
…s (mysql running -> check -> mysql stop -> two fast checks -> second check gives cached answer with 200 code.
Remove cache answers
Code rewritten to use python twisted
mejor enviar los logs a /var/log/messages
I have implemented threads because I have seen several times pyclustercheck stucked with one connection. The problem is if the client (probe) make the 3-way handshake, but never sends the GET HTTP request neither FIN tcp packet. netstat will shown the connection as ESTABLISHED, and clustercheck will hang untill that connection is get closed. To reproduce: With that, data packets (GET HTTP request) and connection close (RST,ACK tcp packets) will be dropped. Only the 3-way handshake will be done. |
merging in your master into a new branch for review; I am presently running a benchmark of this, per included multi-mechanize scripts. AMD FX-8350 4 cores 8 threads benchmarks constant 503 condition, from 2 x 100 thread pools over 10 minutes Original BaseHTTPServer implementation with caching: https://github.com/Oneiroi/clustercheck/tree/master/benchmark/clustercheck/results/results_2014.05.08_09.57.45 Highlights:
Fairly consistent ramp up graphs, ~ 500 tps Notes: 0% cpu load from mysqld whilst cached completely idle Twisted initial review: https://github.com/Oneiroi/clustercheck/tree/twisted_adrianlzt_review/benchmark/clustercheck/results/results_2014.05.08_10.31.51_twisted
~480 tps I'm passing this arround for further peer review; it's very promising. Thank you for contributing here; apologies for the delay in response hopefully we can get this merged in earnest shortly. |
Branch for review is here: https://github.com/Oneiroi/clustercheck/tree/twisted_adrianlzt_review |
todo:
|
…ions to specify ipv4 or ipv6 variable bind address for v4 todo: variable bind addres for v6
Commit 0856957 adds flags -4 / --ipv4 && -6 / --ipv6 -4 / --ipv6 is assumed to be default 0.0.0.0 and -6 / --ipv6 defaults to False |
This ipv6 support requires a newer version of twisted than is generally available on server distros.
|
@Nibbler999 thanks for testing and feedback I'll ensure the functionality is preserved before any merge is completed; not wanting any regression here; it would help to know which distro you have tested this on if possible please. |
That was CentOS 6.5. It has twisted 8.2. I also tested on the RHEL 7.0 RC where it works as expected. |
ignore previous I'm performing a complete rebuild of vm to ensure clean |
@Nibbler999 Confirmed none functional on 6.5
@adrianlzt I'm creating a permanent branch here: https://github.com/Oneiroi/clustercheck/tree/twisted to host the twisted alternative, until we can avoid regression of #8 however I can not merge into master and thus recommend inclusion in PXC packages which is a shame given the perfromance and stability proven by the benchmarks; hopefully this may change in the near future. |
Closing this issue please refer to https://github.com/Oneiroi/clustercheck/tree/twisted for twisted version; thanks again for this contribution it's awesome! |
Happy to see that it could help. |
@adrianlzt @Nibbler999 you'll find a blog post here http://www.mysqlperformanceblog.com/2014/05/16/benchmark-simplehttpserver-vs-pyclustercheck-twisted-implementation/ discussing this issue, and noting your contributions; thank you both again. |
I have addressed two different problems.
First is cache functionality sometimes get broken, and always answer with the cached respose.
Second one, only one connection is allowed simultaneously, and we see several times that pyclustercheck is blocked because a connected client who doesn't release the connection.
Twisted is an easy way to have threads.