Browse Source

Merge pull request #368 from odekopoon/develop

Modify setup file to use mono-sgen, to improve performance when used C# ...
Michael Hixson 12 years ago
parent
commit
555e1a9363

+ 2 - 2
aspnet/setup_nginx.py

@@ -25,7 +25,7 @@ def start(args):
     
     # fastcgi
     for port in range(9001, 9001 + args.max_threads):
-      subprocess.Popen("fastcgi-mono-server4 /applications=/:. /socket=tcp:127.0.0.1:" + str(port) + " &", shell=True, cwd=app)
+      subprocess.Popen("MONO_OPTIONS=--gc=sgen fastcgi-mono-server4 /applications=/:. /socket=tcp:127.0.0.1:" + str(port) + " &", shell=True, cwd=app)
     return 0
   except subprocess.CalledProcessError:
     return 1
@@ -36,5 +36,5 @@ def stop():
   
   subprocess.check_call("sudo /usr/local/nginx/sbin/nginx -c " + root + "/nginx.conf -s stop", shell=True)
   subprocess.check_call("rm -f " + root + "/nginx.upstream.conf", shell=True)
-  subprocess.check_call("pkill -9 mono", shell=True)
+  subprocess.check_call("pkill -9 mono-sgen", shell=True)
   return 0

+ 1 - 1
aspnet/setup_xsp.py

@@ -13,7 +13,7 @@ def start(args):
     subprocess.check_call("rm -rf bin obj", shell=True, cwd="aspnet/src")
     subprocess.check_call("xbuild /p:Configuration=Release", shell=True, cwd="aspnet/src")
     subprocess.check_call("sudo chown -R ubuntu:ubuntu /usr/local/etc/mono", shell=True)
-    subprocess.Popen("xsp4 --nonstop", shell=True, cwd="aspnet/src")
+    subprocess.Popen("MONO_OPTIONS=--gc=sgen xsp4 --nonstop", shell=True, cwd="aspnet/src")
     return 0
   except subprocess.CalledProcessError:
     return 1

+ 2 - 2
nancy/setup_nginx.py

@@ -24,7 +24,7 @@ def start(args):
     
     # fastcgi
     for port in range(9001, 9001 + args.max_threads):
-      subprocess.Popen("fastcgi-mono-server4 /applications=/:. /socket=tcp:127.0.0.1:" + str(port) + " &", shell=True, cwd=app)
+      subprocess.Popen("MONO_OPTIONS=--gc=sgen fastcgi-mono-server4 /applications=/:. /socket=tcp:127.0.0.1:" + str(port) + " &", shell=True, cwd=app)
     return 0
   except subprocess.CalledProcessError:
     return 1
@@ -35,5 +35,5 @@ def stop():
   
   subprocess.check_call("sudo /usr/local/nginx/sbin/nginx -c " + root + "/nginx.conf -s stop", shell=True)
   subprocess.check_call("rm -f " + root + "/nginx.upstream.conf", shell=True)
-  subprocess.check_call("pkill -9 mono", shell=True)
+  subprocess.check_call("pkill -9 mono-sgen", shell=True)
   return 0

+ 1 - 1
nancy/setup_xsp.py

@@ -12,7 +12,7 @@ def start(args):
   try:
     subprocess.check_call("rm -rf bin obj", shell=True, cwd="nancy/src")
     subprocess.check_call("xbuild /p:Configuration=Release", shell=True, cwd="nancy/src")
-    subprocess.Popen("xsp4 --nonstop", shell=True, cwd="nancy/src")
+    subprocess.Popen("MONO_OPTIONS=--gc=sgen xsp4 --nonstop", shell=True, cwd="nancy/src")
     return 0
   except subprocess.CalledProcessError:
     return 1

+ 2 - 2
servicestack/setup_nginx.py

@@ -24,7 +24,7 @@ def start(args):
     
     # fastcgi
     for port in range(9001, 9001 + args.max_threads):
-      subprocess.Popen("fastcgi-mono-server4 /applications=/:. /socket=tcp:127.0.0.1:" + str(port) + " &", shell=True, cwd=app)
+      subprocess.Popen("MONO_OPTIONS=--gc=sgen fastcgi-mono-server4 /applications=/:. /socket=tcp:127.0.0.1:" + str(port) + " &", shell=True, cwd=app)
     return 0
   except subprocess.CalledProcessError:
     return 1
@@ -35,5 +35,5 @@ def stop():
   
   subprocess.check_call("sudo /usr/local/nginx/sbin/nginx -c " + root + "/nginx.conf -s stop", shell=True)
   subprocess.check_call("rm -f " + root + "/nginx.upstream.conf", shell=True)
-  subprocess.check_call("pkill -9 mono", shell=True)
+  subprocess.check_call("pkill -9 mono-sgen", shell=True)
   return 0

+ 1 - 1
servicestack/setup_xsp.py

@@ -12,7 +12,7 @@ def start(args):
   try:
     subprocess.check_call("rm -rf bin obj", shell=True, cwd="servicestack/src")
     subprocess.check_call("xbuild /p:Configuration=Release", shell=True, cwd="servicestack/src/Web.config")
-    subprocess.Popen("xsp4 --nonstop", shell=True, cwd="servicestack/src")
+    subprocess.Popen("MONO_OPTIONS=--gc=sgen xsp4 --nonstop", shell=True, cwd="servicestack/src")
     return 0
   except subprocess.CalledProcessError:
     return 1