Browse Source

Set hard open file limit in addition to soft limit

On Ubuntu Server, the hard limit is 4096, which is less than the
soft limit of 8192 that we're trying to use. Thus, to really use
a soft limit of 8192, we need to also boost the hard limit to
8192.
Malcolm Evershed 12 years ago
parent
commit
d861c457ee
1 changed files with 2 additions and 2 deletions
  1. 2 2
      installer.py

+ 2 - 2
installer.py

@@ -31,7 +31,7 @@ class Installer:
     self.__run_command("sudo apt-get install gcc-4.8 g++-4.8", True)
     self.__run_command("sudo apt-get install gcc-4.8 g++-4.8", True)
     
     
     self.__run_command("cp ../config/benchmark_profile ../../.bash_profile")
     self.__run_command("cp ../config/benchmark_profile ../../.bash_profile")
-    self.__run_command("sudo sh -c \"echo '*               soft    nofile          8192' >> /etc/security/limits.conf\"")
+    self.__run_command("sudo sh -c \"echo '*               -    nofile          8192' >> /etc/security/limits.conf\"")
 
 
     #######################################
     #######################################
     # Languages
     # Languages
@@ -365,7 +365,7 @@ class Installer:
     ##############################
     ##############################
     yes | sudo apt-get update
     yes | sudo apt-get update
     yes | sudo apt-get install build-essential git libev-dev libpq-dev libreadline6-dev postgresql
     yes | sudo apt-get install build-essential git libev-dev libpq-dev libreadline6-dev postgresql
-    sudo sh -c "echo '*               soft    nofile          8192' >> /etc/security/limits.conf"
+    sudo sh -c "echo '*               -    nofile          8192' >> /etc/security/limits.conf"
 
 
     sudo mkdir -p /ssd
     sudo mkdir -p /ssd
     sudo mkdir -p /ssd/log
     sudo mkdir -p /ssd/log