From owner-svn-src-user@FreeBSD.ORG Thu May 14 19:49:00 2015 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 422ACF80; Thu, 14 May 2015 19:49:00 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 30B5A1A1D; Thu, 14 May 2015 19:49:00 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4EJn0Xc013943; Thu, 14 May 2015 19:49:00 GMT (envelope-from pho@FreeBSD.org) Received: (from pho@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4EJmwXj013925; Thu, 14 May 2015 19:48:58 GMT (envelope-from pho@FreeBSD.org) Message-Id: <201505141948.t4EJmwXj013925@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pho set sender to pho@FreeBSD.org using -f From: Peter Holm Date: Thu, 14 May 2015 19:48:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r282919 - user/pho/stress2/misc X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 May 2015 19:49:00 -0000 Author: pho Date: Thu May 14 19:48:57 2015 New Revision: 282919 URL: https://svnweb.freebsd.org/changeset/base/282919 Log: Trim back the VM pressure if no swap disk is used, Sponsored by: EMC / Isilon storage division Modified: user/pho/stress2/misc/crossmp3.sh user/pho/stress2/misc/crossmp4.sh user/pho/stress2/misc/crossmp5.sh user/pho/stress2/misc/mlockall2.sh user/pho/stress2/misc/pfl.sh user/pho/stress2/misc/pfl2.sh user/pho/stress2/misc/tmpfs.sh user/pho/stress2/misc/tmpfs13.sh Modified: user/pho/stress2/misc/crossmp3.sh ============================================================================== --- user/pho/stress2/misc/crossmp3.sh Thu May 14 19:48:15 2015 (r282918) +++ user/pho/stress2/misc/crossmp3.sh Thu May 14 19:48:57 2015 (r282919) @@ -41,7 +41,9 @@ . ../default.cfg N=`sysctl -n hw.ncpu` -size=$((`sysctl -n hw.usermem` / 1024 / 1024 / N)) +usermem=`sysctl -n hw.usermem` +[ `swapinfo | wc -l` -eq 1 ] && usermem=$((usermem/100*80)) +size=$((usermem / 1024 / 1024 / N)) mounts=$N # Number of parallel scripts Modified: user/pho/stress2/misc/crossmp4.sh ============================================================================== --- user/pho/stress2/misc/crossmp4.sh Thu May 14 19:48:15 2015 (r282918) +++ user/pho/stress2/misc/crossmp4.sh Thu May 14 19:48:57 2015 (r282919) @@ -39,7 +39,9 @@ . ../default.cfg N=`sysctl -n hw.ncpu` -size=$((`sysctl -n hw.usermem` / 1024 / 1024)) +usermem=`sysctl -n hw.usermem` +[ `swapinfo | wc -l` -eq 1 ] && usermem=$((usermem/100*80)) +size=$((usermem / 1024 / 1024 / N)) mounts=$N # Number of parallel scripts Modified: user/pho/stress2/misc/crossmp5.sh ============================================================================== --- user/pho/stress2/misc/crossmp5.sh Thu May 14 19:48:15 2015 (r282918) +++ user/pho/stress2/misc/crossmp5.sh Thu May 14 19:48:57 2015 (r282919) @@ -35,7 +35,9 @@ . ../default.cfg N=`sysctl -n hw.ncpu` -size=$((`sysctl -n hw.usermem` / 1024 / 1024 / N)) +usermem=`sysctl -n hw.usermem` +[ `swapinfo | wc -l` -eq 1 ] && usermem=$((usermem/100*80)) +size=$((usermem / 1024 / 1024 / N)) mounts=$N # Number of parallel scripts Modified: user/pho/stress2/misc/mlockall2.sh ============================================================================== --- user/pho/stress2/misc/mlockall2.sh Thu May 14 19:48:15 2015 (r282918) +++ user/pho/stress2/misc/mlockall2.sh Thu May 14 19:48:57 2015 (r282919) @@ -35,7 +35,8 @@ # core dumps seen in watchdogd after mlockall() was added. # This scenario demonstrates the problem. Fixed in r242012. -mem=`sysctl hw.usermem | awk '{print $NF}'` +mem=`sysctl -n hw.usermem` +[ `swapinfo | wc -l` -eq 1 ] && mem=$((mem/100*60)) here=`pwd` cd /tmp Modified: user/pho/stress2/misc/pfl.sh ============================================================================== --- user/pho/stress2/misc/pfl.sh Thu May 14 19:48:15 2015 (r282918) +++ user/pho/stress2/misc/pfl.sh Thu May 14 19:48:57 2015 (r282919) @@ -47,10 +47,17 @@ mp2=${mntpoint}2 md1=$mdstart md2=$((mdstart + 1)) +usermem=`sysctl -n hw.usermem` +[ `swapinfo | wc -l` -eq 1 ] && usermem=$((usermem/100*80)) +size=$((2 * 1024 * 1024 * 1024)) # Ideal disk size is 2G +[ $((size * 2)) -gt $usermem ] && size=$((usermem / 2)) +size=$((size / 1024 / 1024)) + opt=$([ $((`date '+%s'` % 2)) -eq 0 ] && echo "-j" || echo "-U") +[ "$newfs_flags" = "-U" ] || opt="" mount | grep "on $mp1 " | grep -q /dev/md && umount -f $mp1 mdconfig -l | grep -q md$md1 && mdconfig -d -u $md1 -mdconfig -a -t swap -s 2g -u $md1 +mdconfig -a -t swap -s ${size}m -u $md1 bsdlabel -w md$md1 auto newfs $opt md${md1}$part > /dev/null mount /dev/md${md1}$part $mp1 @@ -58,7 +65,7 @@ chmod 777 $mp1 mount | grep "on $mp2 " | grep -q /dev/md && umount -f $mp2 mdconfig -l | grep -q md$md2 && mdconfig -d -u $md2 -mdconfig -a -t swap -s 2g -u $md2 +mdconfig -a -t swap -s ${size}m -u $md2 bsdlabel -w md$md2 auto newfs $opt md${md2}$part > /dev/null mount /dev/md${md2}$part $mp2 Modified: user/pho/stress2/misc/pfl2.sh ============================================================================== --- user/pho/stress2/misc/pfl2.sh Thu May 14 19:48:15 2015 (r282918) +++ user/pho/stress2/misc/pfl2.sh Thu May 14 19:48:57 2015 (r282919) @@ -36,16 +36,24 @@ . ../default.cfg +[ `swapinfo | wc -l` -eq 1 ] && exit 0 + mp1=$mntpoint mp2=${mntpoint}2 [ -d $mp2 ] || mkdir -p $mp2 md1=$mdstart md2=$((mdstart + 1)) +usermem=`sysctl -n hw.usermem` +size=$((2 * 1024 * 1024 * 1024)) # Ideal disk size is 2G +[ $((size * 2)) -gt $usermem ] && size=$((usermem / 2)) +size=$((size / 1024 / 1024)) + opt=$([ $((`date '+%s'` % 2)) -eq 0 ] && echo "-j" || echo "-U") +[ "$newfs_flags" = "-U" ] || opt="" mount | grep "on $mp1 " | grep -q /dev/md && umount -f $mp1 mdconfig -l | grep -q md$md1 && mdconfig -d -u $md1 -mdconfig -a -t swap -s 2g -u $md1 +mdconfig -a -t swap -s ${size}m -u $md1 bsdlabel -w md$md1 auto newfs $opt md${md1}$part > /dev/null mount /dev/md${md1}$part $mp1 @@ -53,7 +61,7 @@ chmod 777 $mp1 mount | grep "on $mp2 " | grep -q /dev/md && umount -f $mp2 mdconfig -l | grep -q md$md2 && mdconfig -d -u $md2 -mdconfig -a -t swap -s 2g -u $md2 +mdconfig -a -t swap -s ${size}m -u $md2 bsdlabel -w md$md2 auto newfs $opt md${md2}$part > /dev/null mount /dev/md${md2}$part $mp2 Modified: user/pho/stress2/misc/tmpfs.sh ============================================================================== --- user/pho/stress2/misc/tmpfs.sh Thu May 14 19:48:15 2015 (r282918) +++ user/pho/stress2/misc/tmpfs.sh Thu May 14 19:48:57 2015 (r282919) @@ -35,7 +35,10 @@ . ../default.cfg mount | grep "$mntpoint" | grep -q tmpfs && umount $mntpoint -mount -t tmpfs tmpfs $mntpoint +usermem=`sysctl -n hw.usermem` +[ `swapinfo | wc -l` -eq 1 ] && usermem=$((usermem/100*80)) +size=$((usermem / 1024 / 1024 / 2)) +mount -o size=${size}m -t tmpfs tmpfs $mntpoint export RUNDIR=$mntpoint/stressX export runRUNTIME=10m # Run tests for 10 minutes Modified: user/pho/stress2/misc/tmpfs13.sh ============================================================================== --- user/pho/stress2/misc/tmpfs13.sh Thu May 14 19:48:15 2015 (r282918) +++ user/pho/stress2/misc/tmpfs13.sh Thu May 14 19:48:57 2015 (r282919) @@ -39,7 +39,9 @@ . ../default.cfg N=`sysctl -n hw.ncpu` -size=$((`sysctl -n hw.usermem` / 1024 / 1024 / N)) +usermem=`sysctl -n hw.usermem` +[ `swapinfo | wc -l` -eq 1 ] && usermem=$((usermem/100*80)) +size=$((usermem / 1024 / 1024 / 2)) export runRUNTIME=15m export RUNDIR=$mp1/stressX