public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Paulo Marques <pmarques@grupopie.com>
To: linux-kernel@vger.kernel.org
Subject: Slowdown with randomize_va_space in 2.6.12.2
Date: Wed, 06 Jul 2005 15:23:56 +0100	[thread overview]
Message-ID: <42CBE97C.2060208@grupopie.com> (raw)


Hi, all

I have a bash script that calls a small application several times 
(around 50 calls) that just send and receives data through an already 
open tcp socket to a local server through the loopback device. It also 
launches another small app several times that just reads a small file 
from disk and does some processing on it in memory.

We noticed a severe performance regression on this application under 
kernel 2.6.12.2 that we tracked down to the address space randomization 
patches:

# echo 0 > randomize_va_space
# time ./script
real    0m0.671s
user    0m0.293s
sys     0m0.325s

# echo 1 > randomize_va_space
# time ./script
real    0m3.310s
user    0m2.712s
sys     0m0.401s

Notice that the real time is 5x slower with "randomize_va_space" turned 
on. This is on a Transmeta Crusoe TM5600 at 533MHz.

What is weird is that most of the extra time is being accounted as 
user-space time, but the user-space application is exactly the same in 
both runs, only the "randomize_va_space" parameter changed.

I browsed the randomization patch code and I don't think the random 
calculations themselves could account for all that time.

Does anybody have a clue as to why this is happening or what I should do 
to debug this further?

-- 
Paulo Marques - www.grupopie.com

It is a mistake to think you can solve any major problems
just with potatoes.
Douglas Adams

             reply	other threads:[~2005-07-06 19:44 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-07-06 14:23 Paulo Marques [this message]
2005-07-06 19:57 ` Slowdown with randomize_va_space in 2.6.12.2 David S. Miller
2005-07-06 20:53   ` Dave Jones
2005-07-06 20:58     ` David S. Miller
2005-07-07  1:12     ` Andrew Morton
2005-07-07  2:07       ` David S. Miller
2005-07-07  4:11         ` pmarques
2005-07-07  6:37       ` Arjan van de Ven
2005-07-07  6:41         ` Andrew Morton
2005-07-07  6:46           ` Arjan van de Ven
2005-07-30  0:53         ` Eric Lammerts
2005-07-30  1:20           ` Andrew Morton
2005-07-30 11:49             ` Arjan van de Ven
2005-07-30 11:55             ` Arjan van de Ven
2005-07-06 21:00   ` Arjan van de Ven

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=42CBE97C.2060208@grupopie.com \
    --to=pmarques@grupopie.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox