From 0abee610f04b91a326fa9dbbb2d596b67221fd06 Mon Sep 17 00:00:00 2001 From: Maciej Wawryk Date: Tue, 16 Jul 2019 08:09:14 +0200 Subject: [PATCH] test/setup: check open files limit Signed-off-by: Maciej Wawryk Change-Id: I0826c93934025a5ec7126f0f6223d42177054f06 Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/462010 Reviewed-by: Darek Stojaczyk Reviewed-by: Shuhei Matsumoto Tested-by: SPDK CI Jenkins --- scripts/setup.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/scripts/setup.sh b/scripts/setup.sh index 59e6853a7..139309d46 100755 --- a/scripts/setup.sh +++ b/scripts/setup.sh @@ -365,6 +365,21 @@ function configure_linux { exit 1 fi + CURENT_SOFT_ULIMIT=$(ulimit -n) + if [ "$CURENT_SOFT_ULIMIT" != "unlimited" ]; then + echo "" + echo "WARNING: soft ulimit for max open files is set to $CURENT_SOFT_ULIMIT." + echo "SPDK won't be able to use more than $CURENT_SOFT_ULIMIT hugepages if run as current user." + echo "" + fi + CURENT_HARD_ULIMIT=$(ulimit -Hn) + if [ "$CURENT_HARD_ULIMIT" != "unlimited" ]; then + echo "" + echo "WARNING: hard ulimit for max open files is set to $CURENT_HARD_ULIMIT." + echo "SPDK won't be able to use more than $CURENT_HARD_ULIMIT hugepages even if run as root." + echo "" + fi + if [ "$driver_name" = "vfio-pci" ]; then if [ -n "$TARGET_USER" ]; then for mount in $hugetlbfs_mounts; do