Browse Source

Modify setup file to use mono-sgen, to improve performance when used C# with mono.

Koji Yusa 12 years ago
parent
commit
2b68d877c5

+ 1 - 1
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

+ 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

+ 1 - 1
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

+ 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

+ 1 - 1
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

+ 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