[httperf] Httperf client timeout while making progress

Chris Wilson chris at aidworld.org
Fri Nov 24 11:43:57 PST 2006


Hi Martin,

On Fri, 24 Nov 2006, Martin Arlitt wrote:

> you are correct, there is a discrepancy between the behaviour and the
> documentation.  more specifically, httperf does not appear to update the
> timeout value for the fourth case, so in effect it will time out X seconds
> after it starts waiting for the start of the reply, rather than from when
> the start of the reply is received.
>
> a fix that resets the timer each time a new packet in the reply is
> received is:

Thanks, that first patch works for me!

I think I found another issue, and I probably should start a new thread 
for this, but I hope you will forgive me. I'm sure this works sometimes, 
but right now for me, httperf --hog does not work. It gives an error when 
trying to connect() to the remote host, on FreeBSD 5.5:

root at utalii(httperf)$ httperf --hog --server www.cnn.com --num-conns 1
   --num-calls 1 --rate 0.2 --http-version=1.0 --timeout 30
httperf --hog --timeout=30 --client=0/1 --server=www.cnn.com --port=80
   --uri=/ --http-version=1.0 --rate=0.2 --send-buffer=4096
   --recv-buffer=16384 --num-conns=1 --num-calls=1
httperf: warning: open file limit > FD_SETSIZE; limiting max. # of open 
files to FD_SETSIZE
httperf: connection failed with unexpected error 1
Maximum connect burst length: 0 [...]

root at utalii(httperf)$ strace httperf --hog --server www.cnn.com
   --num-conns 1 --num-calls 1 --rate 0.2 --http-version=1.0 --timeout 30
[...]
socket(PF_INET, SOCK_DGRAM, IPPROTO_IP) = 4
connect(4, {sa_family=AF_INET, sin_port=htons(53),
   sin_addr=inet_addr("212.49.82.62")}, 16) = 0
sendto(4, "\20\2\0005\3241F\26\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"...,
   29, 0, NULL, 0) = 29
gettimeofday({4227858432, 536870952}, NULL) = 0
kevent(0x3, 0xbfbfce30, 0x1, 0xbfbfce30, 0x1, 0xbfbfce10) = 1
recvfrom(4, "(\374\201\200\0\1\0\t\0\0\0\0\3www\3cnn\3com\0\0\1\0\1"...,
   65536, 0, {sa_family=AF_UNSPEC,
   sa_data="\220\0\4@\354\20T\0\0\0\0\0\0\0"}, [65541]) = 171
close(4)                                = 0
close(3)                                = 0
syscall_416(0x2, 0xbfbfe720, 0xbfbfe700) = 0
gettimeofday({0, 0}, NULL)              = 0
socket(PF_INET, SOCK_STREAM, IPPROTO_IP) = 3
fcntl(3, F_SETFL, O_RDONLY|O_NONBLOCK)  = 0
setsockopt(3, 0x6 /* SOL_?? */, TCP_NODELAY, [0], 4) = 0
setsockopt(3, SOL_SOCKET, SO_SNDBUF, [0], 4) = 0
setsockopt(3, SOL_SOCKET, SO_RCVBUF, [0], 4) = 0
bind(3, {sa_family=AF_UNSPEC, sa_data="\4\0\0\0\0\0\0\0\0\0\0\0\0\0"}, 16)
   = 0
connect(3, {sa_family=AF_INET, sin_port=htons(80),
   sin_addr=inet_addr("64.236.16.116")}, 16) = -1 EPERM (Operation not
   permitted)
getsockopt(3, SOL_SOCKET, SO_ERROR, "", [0]) = 0
write(2, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"...,
   51httperf: connection failed with unexpected error 1
   ) = 51

I think the problem is with the bind(), but I'm not sure why. When I don't 
use --hog, the bind() doesn't happen and httperf works fine.

Cheers, Chris.
-- 
(aidworld) chris wilson | chief engineer (http://www.aidworld.org)


More information about the httperf mailing list