diff --git a/include/tr/comm_end_point.h b/include/tr/comm_end_point.h index 3df7884..2c57499 100644 --- a/include/tr/comm_end_point.h +++ b/include/tr/comm_end_point.h @@ -33,7 +33,8 @@ * Read ahead limits. * These values should be conficurable in the future. */ -#define CEP_WRITE_BUFFER_THRESHOLD 128 * 1024 +#define CEP_WRITE_BUFFER_THRESHOLD 512 * 1024 +#define CEP_DEFAULT_READ_SIZE 128 * 1024 TR_CLASS(TR_CommEndPoint) { TR_EXTENDS(TR_EventSubject); diff --git a/src/connector.c b/src/connector.c index 3ddfdf9..a3bc9ce 100644 --- a/src/connector.c +++ b/src/connector.c @@ -65,7 +65,7 @@ connectorAccept(void * _this, TR_Event event) TR_Connection, socket, connection->protocol, - 8192); + CEP_DEFAULT_READ_SIZE); TR_eventHandlerIssueEvent( (TR_EventHandler)this, TR_eventSubjectEmit( diff --git a/testers/testclient.sh b/testers/testclient.sh index 773e14b..1b235d2 100755 --- a/testers/testclient.sh +++ b/testers/testclient.sh @@ -1,9 +1,9 @@ #!/bin/sh -BS=8192 -COUNT=1000000 -CONCURENT=20 -IP="localhost" +BS=$((128*1024)) +COUNT=10000 +CONCURENT=200 +IP="192.168.2.13" pids="" i=0 @@ -12,7 +12,7 @@ MESSAGE="GET / HTTP/1.1\r\nConnection: keep-alive\r\n\r\n" while [ $i -lt ${CONCURENT} ] do dd if=/dev/zero bs=${BS} count=${COUNT} | nc -q 1 ${IP} 5678 >/dev/null & - #echo -en "${MESSAGE}" | nc -q 1 -u ${IP} 5678 & + #echo -en "${MESSAGE}" | nc -q 1 ${IP} 5678 & pids="${pids} $!" i=$((i + 1))