> I encounter a problem of running Apache httpd server using Valgrind. > Valgrind seems to decrease the performance of Apache server too much that > the client always report a timeout error. I am also not sure if I used the > correct command line option. I just type "Valgrind --tool=xxx ./httpd > start". I don't know what is wrong, so I ask for your help.
The first thing to try is "--tool=none". What slowdown do you observe? A slowdown by a factor of 20 to 30 would not be unusual for "--tool=memcheck". If the Apache httpd server itself is the process which complains about timeout, then you can try dilating the allowed time, by modifying the source of either httpd or memcheck. For example, I did this with 'wine' some years ago: http://bugs.winehq.org/show_bug.cgi?id=14370 This code just multiplies the delay argument to setitimer() by the value of an environment variable. Sometimes this works. Or, you can find the valgrind subroutine PRE(sys_setitimer) and modify the delay value there. If the _client_ (and not the Apache httpd server) is the process that complains of timeout (because of slow service when Apache httpd is run under memcheck), then you must try to extend the timeout of the client. Which client is complaining? Is it 'firefox'? You might consider export LD_PRELOAD=/path/to/wrapper/for/setitimer.so where setitimer.so intercepts all calls to setitimer, multiplies the delay argument by 50, then calls the next setitimer in the global symbol table. See the documentation "man 3 dlsym" and look for RTLD_NEXT; also search for an example which "wraps" a system call using RTLD_NEXT. -- ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Valgrind-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/valgrind-users
