Commit b7d8300295996f477d3ff7825c243f3f7556a3bf

Authored by Georg Hopp
1 parent a3f209e5

increase read block size to 128 KB

@@ -33,7 +33,8 @@ @@ -33,7 +33,8 @@
33 * Read ahead limits. 33 * Read ahead limits.
34 * These values should be conficurable in the future. 34 * These values should be conficurable in the future.
35 */ 35 */
36 -#define CEP_WRITE_BUFFER_THRESHOLD 128 * 1024 36 +#define CEP_WRITE_BUFFER_THRESHOLD 512 * 1024
  37 +#define CEP_DEFAULT_READ_SIZE 128 * 1024
37 38
38 TR_CLASS(TR_CommEndPoint) { 39 TR_CLASS(TR_CommEndPoint) {
39 TR_EXTENDS(TR_EventSubject); 40 TR_EXTENDS(TR_EventSubject);
@@ -65,7 +65,7 @@ connectorAccept(void * _this, TR_Event event) @@ -65,7 +65,7 @@ connectorAccept(void * _this, TR_Event event)
65 TR_Connection, 65 TR_Connection,
66 socket, 66 socket,
67 connection->protocol, 67 connection->protocol,
68 - 8192); 68 + CEP_DEFAULT_READ_SIZE);
69 TR_eventHandlerIssueEvent( 69 TR_eventHandlerIssueEvent(
70 (TR_EventHandler)this, 70 (TR_EventHandler)this,
71 TR_eventSubjectEmit( 71 TR_eventSubjectEmit(
1 #!/bin/sh 1 #!/bin/sh
2 2
3 -BS=8192  
4 -COUNT=1000000  
5 -CONCURENT=20  
6 -IP="localhost" 3 +BS=$((128*1024))
  4 +COUNT=10000
  5 +CONCURENT=200
  6 +IP="192.168.2.13"
7 pids="" 7 pids=""
8 i=0 8 i=0
9 9
@@ -12,7 +12,7 @@ MESSAGE="GET / HTTP/1.1\r\nConnection: keep-alive\r\n\r\n" @@ -12,7 +12,7 @@ MESSAGE="GET / HTTP/1.1\r\nConnection: keep-alive\r\n\r\n"
12 while [ $i -lt ${CONCURENT} ] 12 while [ $i -lt ${CONCURENT} ]
13 do 13 do
14 dd if=/dev/zero bs=${BS} count=${COUNT} | nc -q 1 ${IP} 5678 >/dev/null & 14 dd if=/dev/zero bs=${BS} count=${COUNT} | nc -q 1 ${IP} 5678 >/dev/null &
15 - #echo -en "${MESSAGE}" | nc -q 1 -u ${IP} 5678 & 15 + #echo -en "${MESSAGE}" | nc -q 1 ${IP} 5678 &
16 16
17 pids="${pids} $!" 17 pids="${pids} $!"
18 i=$((i + 1)) 18 i=$((i + 1))
Please register or login to post a comment