Re: Make apache sleep

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On Oct 22, 2007, at 7:31 PM, Joshua Slive wrote:

On 10/22/07, Eric Covener <covener@xxxxxxxxx> wrote:
On 10/22/07, Jim Albert <jim@xxxxxxxxxxxxx> wrote:
For the purposes of testing a heavy load situation, I'd like to
configure one of my apache web servers to intentionally respond slow to
a request.

mod_ext_filter might help you simulate some of this by adding some
silly perl/php/python as an output filter that stalls/burns cpu/etc.

Or just "cat" combined with "sleep".

That would work for slow output, but not necessarily if you want to simulate high CPU load. Turns out the OS (at least Linux, haven't tried any others) is smart about sleep() and doesn't actually make it use CPU cycles. So sleep()ing a bunch of processes/threads will not get you a high CPU load.

To keep the CPUs busy you'd have to make it do something resource- intensive, like compute digits of Pi, or find partial hash collisions.

S.

--
Sander Temme
sctemme@xxxxxxxxxx
PGP FP: 51B4 8727 466A 0BC3 69F4  B7B8 B2BE BC40 1529 24AF




---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
  "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx


[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux