]> git.wh0rd.org Git - home.git/commitdiff
set proc limit based on # of cpus
authorMike Frysinger <vapier@gentoo.org>
Thu, 6 Sep 2012 17:03:47 +0000 (13:03 -0400)
committerMike Frysinger <vapier@gentoo.org>
Thu, 6 Sep 2012 17:03:47 +0000 (13:03 -0400)
.bashrc

diff --git a/.bashrc b/.bashrc
index 76154e2c7299a0695b85166c88aca48b2c2cbf5e..02b3fbbcd046f838bad802f46d2964eb2c476604 100644 (file)
--- a/.bashrc
+++ b/.bashrc
@@ -34,4 +34,4 @@ eval `dircolors 2>/dev/null`
 export GTK2_RC_FILES="$HOME/.gtkrc-2.0:$HOME/.kde/share/config/gtkrc-2.0:/etc/gtk-2.0/gtkrc"
 
 ulimit -c $(( 512 * 1024 )) # units of KiB
-ulimit -u 1000
+ulimit -u $(( 500 * $(getconf _NPROCESSORS_ONLN 2>/dev/null || echo 1) ))