Browse code

attempt to cut api workers in half

One of the key reasons for the large number of API_WORKERS was that
mysql would block API workers, so would start rejecting work. Now with
the python mysql driver we should be eventlet aware, and life should
be good.

Let's see if this works.

Change-Id: Iaf8730a4dcdc30ef390795bfb5fb73ec3cd665fe

Sean Dague authored on 2015/09/23 23:36:53
Showing 2 changed files
... ...
@@ -607,6 +607,8 @@ function create_nova_conf {
607 607
     iniset $NOVA_CONF DEFAULT osapi_compute_workers "$API_WORKERS"
608 608
     iniset $NOVA_CONF DEFAULT ec2_workers "$API_WORKERS"
609 609
     iniset $NOVA_CONF DEFAULT metadata_workers "$API_WORKERS"
610
+    # don't let the conductor get out of control now that we're using a pure python db driver
611
+    iniset $NOVA_CONF conductor workers "$API_WORKERS"
610 612
 
611 613
     iniset $NOVA_CONF cinder os_region_name "$REGION_NAME"
612 614
 
... ...
@@ -631,7 +631,7 @@ SERVICE_PROTOCOL=${SERVICE_PROTOCOL:-http}
631 631
 # the memory used where there are a large number of CPUs present
632 632
 # (the default number of workers for many services is the number of CPUs)
633 633
 # Also sets the minimum number of workers to 2.
634
-API_WORKERS=${API_WORKERS:=$(( ($(nproc)/2)<2 ? 2 : ($(nproc)/2) ))}
634
+API_WORKERS=${API_WORKERS:=$(( ($(nproc)/4)<2 ? 2 : ($(nproc)/4) ))}
635 635
 
636 636
 # Service startup timeout
637 637
 SERVICE_TIMEOUT=${SERVICE_TIMEOUT:-60}