<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div style="-webkit-text-size-adjust: auto; "><span style="font-family: '.HelveticaNeueUI'; font-size: 15px; line-height: 19px; white-space: nowrap; -webkit-tap-highlight-color: rgba(26, 26, 26, 0.296875); -webkit-composition-fill-color: rgba(175, 192, 227, 0.230469); -webkit-composition-frame-color: rgba(77, 128, 180, 0.230469); -webkit-text-size-adjust: none; ">See: <a href="https://github.com/openstack/keystone/tree/master/httpd">https://github.com/openstack/keystone/tree/master/httpd</a></span></div><div><font face=".HelveticaNeueUI"><span style="font-size: 15px; line-height: 19px; white-space: nowrap; -webkit-tap-highlight-color: rgba(26, 26, 26, 0.292969); -webkit-composition-fill-color: rgba(175, 192, 227, 0.230469); -webkit-composition-frame-color: rgba(77, 128, 180, 0.230469);"><br></span></font></div><div><font face=".HelveticaNeueUI"><span style="font-size: 15px; line-height: 19px; white-space: nowrap; -webkit-tap-highlight-color: rgba(26, 26, 26, 0.292969); -webkit-composition-fill-color: rgba(175, 192, 227, 0.230469); -webkit-composition-frame-color: rgba(77, 128, 180, 0.230469);">For example...<br></span></font><br>This lets apache do the multiprocess instead of how nova, glance ... have basically recreated the same mechanism that apache has had for years.<br><br><span style="-webkit-text-size-adjust: auto;">Sent from my really tiny device...</span></div><div style="-webkit-text-size-adjust: auto; "><br>On Mar 23, 2013, at 10:14 AM, "Joshua Harlow" <<a href="mailto:harlowja@yahoo-inc.com">harlowja@yahoo-inc.com</a>> wrote:<br><br></div><blockquote type="cite" style="-webkit-text-size-adjust: auto; "><div><span>Or I think u can run keystone in wsgi+apache easily, thus getting u the</span><br><span>multiprocess support via apache worker processes.</span><br><span></span><br><span>Sent from my really tiny</span><br><span>device...</span><br><span></span><br><span>On Mar 22, 2013, at 10:47 AM, "Jay Pipes" <<a href="mailto:jaypipes@gmail.com">jaypipes@gmail.com</a>></span><br><span>wrote:</span><br><span></span><br><blockquote type="cite"><span>Unfortunately, Keystone's WSGI server is only a single process,</span><br></blockquote><span>with a</span><br><blockquote type="cite"><span>greenthread pool. Unlike Glance, Nova, Cinder, and Swift, which all</span><br></blockquote><span>use</span><br><blockquote type="cite"><span>multi-process, greenthread-pool-per-process WSGI servers[1],</span><br></blockquote><span>Keystone</span><br><blockquote type="cite"><span>does it differently[2].</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>There was a patchset[3] that added</span><br></blockquote><span>multiprocess support to Keystone, but</span><br><blockquote type="cite"><span>due to objections from termie and</span><br></blockquote><span>others about it not being necessary,</span><br><blockquote type="cite"><span>it died on the vine. Termie even</span><br></blockquote><span>noted that Keystone "was designed to be</span><br><blockquote type="cite"><span>run as multiple instances and load</span><br></blockquote><span>balanced over and [he felt] that</span><br><blockquote type="cite"><span>should be the preferred scaling point".</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>Because the mysql client connection is C-based, calls to it will be</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><span>blocking operations on greenthreads within a single process, meaning</span><br><blockquote type="cite"><span>even</span><br></blockquote><span>if multiple greenthreads are spawned for those 200 incoming</span><br><blockquote type="cite"><span>requests, they</span><br></blockquote><span>will be processed synchronously.</span><br><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>The solution is for Keystone to</span><br></blockquote><span>implement the same multi-processed WSGI</span><br><blockquote type="cite"><span>worker stuff that is in the other</span><br></blockquote><span>OpenStack projects. Or, diverge from</span><br><blockquote type="cite"><span>the deployment solution of Nova,</span><br></blockquote><span>Glance, Cinder, and Swift, and manually</span><br><blockquote type="cite"><span>run multiple instances of</span><br></blockquote><span>keystone, as Termie suggests.</span><br><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>Best,</span><br></blockquote><blockquote type="cite"><span>-jay</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>[1] All pretty much</span><br></blockquote><span>derived from the original Swift code, with some Oslo</span><br><blockquote type="cite"><span>improvements around</span><br></blockquote><span>config</span><br><blockquote type="cite"><span>[2] Compare</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><span><a href="https://github.com/openstack/glance/blob/master/glance/common/wsgi.py">https://github.com/openstack/glance/blob/master/glance/common/wsgi.py</a></span><br><blockquote type="cite"><span></span><br></blockquote><span>with</span><br><blockquote type="cite"><span></span><br></blockquote><span><a href="https://github.com/openstack/keystone/blob/master/keystone/common/wsgi.py">https://github.com/openstack/keystone/blob/master/keystone/common/wsgi.py</a></span><br><blockquote type="cite"><span></span><br></blockquote><span>[3] <a href="https://review.openstack.org/#/c/7017/">https://review.openstack.org/#/c/7017/</a></span><br><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>On 03/21/2013 07:45 AM,</span><br></blockquote><span>Kanade, Rohan wrote:</span><br><blockquote type="cite"><blockquote type="cite"><span>Hi,</span><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span></span><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span>I was trying to create 200 users using</span><br></blockquote></blockquote><span>the keystone client. All the</span><br><blockquote type="cite"><blockquote type="cite"><span>users are unique and are created on separate</span><br></blockquote></blockquote><span>threads which are started</span><br><blockquote type="cite"><blockquote type="cite"><span>at the same time. </span><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span></span><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span>keystone is handling</span><br></blockquote></blockquote><span>each request synchronously , i.e. user 1 is</span><br><blockquote type="cite"><blockquote type="cite"><span>created, then user 2 is</span><br></blockquote></blockquote><span>created ...</span><br><blockquote type="cite"><blockquote type="cite"><span></span><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span>Shouldnt keystone be running a greenthread for each</span><br></blockquote></blockquote><span>request and try to</span><br><blockquote type="cite"><blockquote type="cite"><span>create these users asynchronously? </span><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span>like start</span><br></blockquote></blockquote><span>creating user 1 , while handling that request, start creating</span><br><blockquote type="cite"><blockquote type="cite"><span>user 2 or</span><br></blockquote></blockquote><span>user n... </span><br><blockquote type="cite"><blockquote type="cite"><span></span><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span>I have attached the keystone service logs for further</span><br></blockquote></blockquote><span>assistance.</span><br><blockquote type="cite"><blockquote type="cite"><span><a href="http://paste.openstack.org/show/34216/">http://paste.openstack.org/show/34216/</a></span><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span></span><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span></span><br></blockquote></blockquote><span>______________________________________________________________________</span><br><blockquote type="cite"><blockquote type="cite"><span></span><br></blockquote></blockquote><span>Disclaimer:This email and any attachments are sent in strictest</span><br><blockquote type="cite"><blockquote type="cite"><span></span><br></blockquote></blockquote><span>confidence for the sole use of the addressee and may contain legally</span><br><blockquote type="cite"><blockquote type="cite"><span></span><br></blockquote></blockquote><span>privileged, confidential, and proprietary data. If you are not the</span><br><blockquote type="cite"><blockquote type="cite"><span></span><br></blockquote></blockquote><span>intended recipient, please advise the sender by replying promptly to</span><br><blockquote type="cite"><blockquote type="cite"><span>this</span><br></blockquote></blockquote><span>email and then delete and destroy this email and any attachments</span><br><blockquote type="cite"><blockquote type="cite"><span>without</span><br></blockquote></blockquote><span>any further use, copying or forwarding</span><br><blockquote type="cite"><blockquote type="cite"><span></span><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span></span><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span></span><br></blockquote></blockquote><span>_______________________________________________</span><br><blockquote type="cite"><blockquote type="cite"><span>OpenStack-dev mailing</span><br></blockquote></blockquote><span>list</span><br><blockquote type="cite"><blockquote type="cite"><span><a href="mailto:OpenStack-dev@lists.openstack.org">OpenStack-dev@lists.openstack.org</a></span><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span></span><br></blockquote></blockquote><span><a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a></span><br><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><span>_______________________________________________</span><br><blockquote type="cite"><span>OpenStack-dev mailing</span><br></blockquote><span>list</span><br><blockquote type="cite"><span><a href="mailto:OpenStack-dev@lists.openstack.org">OpenStack-dev@lists.openstack.org</a></span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><span><a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a></span><br><span></span><br><span></span><br></div></blockquote></body></html>