On Thu, 2015-05-21 at 01:53 +0200, Thomas Graf wrote:
> On 05/15/15 at 08:06am, Herbert Xu wrote:
> > On Thu, May 14, 2015 at 07:37:56AM -0700, Eric Dumazet wrote:
> > >
> > > This solves the corruption thanks Herbert.
> > 
> > Great.
> > 
> > > But wasn't rhashtable meant to be faster ? ;)
> > 
> > Is it, that's news to me :)
> 
> Eric, can you share the scripts you used to test this?

I believe I posted the getaddrinfo C prog already.

Here is the shell script :

# cat getaddrinfo_many.sh 
#!/bin/bash

TRANSACTIONS_PER_JOB=500
JOBS=200

run_netperf() {
  for ((i=0; i<$JOBS; i++)); do
    ./getaddrinfo $TRANSACTIONS_PER_JOB &> $i.out && rm $i.out &
  done
  wait
  return 0
}

run_once() {
  seconds=$(TIMEFORMAT="%R";(time run_netperf) 2>&1)
  total_transactions=$(($TRANSACTIONS_PER_JOB * $JOBS))
  transactions_per_second=$(echo "print $total_transactions / $seconds" | 
python)
  echo $transactions_per_second
  return 0
}

start_time=$(date +%s)
while true; do
  result=$(run_once)
  current_time=$(date +%s)
  elapsed=$(($current_time - $start_time))
  echo -n "TPS: $result  Seconds Elapsed: $elapsed  Current time: "
  date
done



--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to