Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 27 Mar 2015 10:36:18 +0300
From:      Artem Kuchin <artem@artem.ru>
Cc:        FreeBSD Questions Mailing List <freebsd-questions@freebsd.org>
Subject:   Re: rm -rf stalls server
Message-ID:  <55150872.3010205@artem.ru>
In-Reply-To: <CAOgwaMsodE2ZSubknmGQoXz7z13Fas3vvLzKTgO1_BVY3x6qsQ@mail.gmail.com>
References:  <55144606.7000003@artem.ru> <CAOgwaMsodE2ZSubknmGQoXz7z13Fas3vvLzKTgO1_BVY3x6qsQ@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
26.03.2015 23:25, Mehmet Erol Sanliturk пишет:
>
>
> On Thu, Mar 26, 2015 at 10:46 AM, Artem Kuchin <artem@artem.ru 
> <mailto:artem@artem.ru>> 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






Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?55150872.3010205>