From owner-freebsd-questions@FreeBSD.ORG Fri Mar 27 07:37:11 2015 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0BA1AAAC for ; Fri, 27 Mar 2015 07:37:11 +0000 (UTC) Received: from fallback4.mail.ru (fallback4.mail.ru [94.100.181.169]) by mx1.freebsd.org (Postfix) with ESMTP id 7BDC818D for ; Fri, 27 Mar 2015 07:37:09 +0000 (UTC) Received: from smtp1.mail.ru (smtp1.mail.ru [94.100.179.111]) by fallback4.mail.ru (mPOP.Fallback_MX) with ESMTP id 0DB613C6B41 for ; Fri, 27 Mar 2015 10:35:58 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mail.ru; s=mail2; h=Content-Type:In-Reply-To:References:Subject:CC:MIME-Version:From:Date:Message-ID; bh=s6ZaDnTgu9Jp66gvKd0vX2VHptzFExQxc+1H1mSsvVI=; b=OF8wTwaT0tAux7vKLtrQZ8bD1KLOiHoMKAnppVISBTwVU8DBvWayhUQpb7rVfH3K7YmD3l+LmyOIU7VIqdNRS/NmJMfOih+GZKQlLwHyLkxfWNeftDqU8L4M6x6RXJAKQjS+2c8bh9qNWDkuwsEivN8mbHBylF4iyyDxGqig1vk=; Received: from [109.188.127.13] (port=50660 helo=[192.168.0.12]) by smtp1.mail.ru with esmtpa (envelope-from ) id 1YbOo1-0002wa-6B for freebsd-questions@freebsd.org; Fri, 27 Mar 2015 10:35:49 +0300 Message-ID: <55150872.3010205@artem.ru> Date: Fri, 27 Mar 2015 10:36:18 +0300 From: Artem Kuchin User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 CC: FreeBSD Questions Mailing List Subject: Re: rm -rf stalls server References: <55144606.7000003@artem.ru> In-Reply-To: X-Spam: Not detected X-Mras: Ok Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Mar 2015 07:37:11 -0000 26.03.2015 23:25, Mehmet Erol Sanliturk пишет: > > > On Thu, Mar 26, 2015 at 10:46 AM, Artem Kuchin > wrote: > > So, i do > rm -rf tree_root > > After i do it in 5 minutes process count goes over 1000, mysql is > flooded with > request it cannot complete. I can barely type anything. Top shown > tons of processes > in 'ufs' status. > So, I ctrl-C rm command > and kill -9 apache, otherwise it will take like 20 minutes to > resume normal operations. > > > > > I am using a script to delete .BAK files from many directories with > lines like > > rm path/*.BAK > find path -name '*.BAK' -exec rm -f '{}' + > > > I think , it will not load your CPU continuously with a single > execution for all of the directories . > > Well, it is not about CPU load. Disk system is overloaded. I probably missed one important point What if user starts tarring or rmrfing something and stalls server? Is there system way to lower io priority or limit io ops per user? Basically, if user does rm -rf on huge tree it is an equivalent of a fork bomb. Artem