To stress test our servers we’re benchmarking them. By monitoring both the webservers and database we can tune our setup and see where the performance bottleneck is located. To properly test the website we need to take a “snapshot” from the requests that are performed on the webservers. To do that, we make a log [...]
Make sure you have a fresh default installation of debian 505 running. Also make sure you have ssh running. New kernel ?View Code BASH1 2 3 4 5 6 7 cd /usr/src/ wget http://…/linux-headers-2.6.34.1-myp2p_2.6.34.1-myp2p-10.00.Custom_amd64.deb wget http://…/linux-image-2.6.34.1-myp2p_2.6.34.1-myp2p-10.00.Custom_amd64.deb dpkg -i linux-image-*.deb dpkg -i linux-headers-*.deb update-initramfs -k 2.6.34.1-myp2p -c pico /boot/grub/menu.list Now make sure that the file system [...]
One of our servers has been dealing with huge peaks of iowait. After some investigation i noticed that this is (obviously) caused by a disk writing. The iostat program gave me huge Blk_wrtn/s numbers for my first partition device. I wrote a very poor but usefull php command line application that detects processes that are [...]
Since we’re running our vbulletin software for myp2p on multiple servers, an nginx frontend balances the traffic. We have a memcached cookie sync for session persistance with the following php.ini configuration lines: ?View Code PHP1 2 3 [Session] session.save_handler = memcache session.save_path="tcp://<memcache host>:11211?persistent=1&weight=1&timeout=1&retry_interval=15" Make sure to remove the old session.save_handler/path lines. The includes/class_core.php file needs [...]
Posted on 16-08-2009, 14:08, by edo, under
PHP.
?View Code BASH1 2 3 4 5 function timeDebug($startTime,$timeCount){ $currentTime = explode(" ",microtime()); $currentTime = floatval($currentTime[0] + $currentTime[1]); echo "[" . $timeCount . ": " . floatval($currentTime - $startTime) . "]<br />"; } ?View Code BASH1 2 3 4 5 $startTime = explode(" ",microtime()); $startTime = floatval($startTime[0] + $startTime[1]); $timeCount = 0; timeDebug($startTime,1);
Check out the document: Apache and php
Posted on 07-06-2008, 21:11, by edo, under
PHP,
lighttpd.
myp2p_seo.txtOn myp2p, we’re using some ugly search engine unfriendly url’s. URL’s like competition.php?competitionid=&part=sports&discipline=football are not user- nor google friendly. It seems to be popular these days to split the url in a directory kind of look. The previously mentioned URL would become something like /competition/sports/football/. First thing to do to make myp2p SEO (search engine [...]
Posted on 18-03-2008, 12:20, by edo, under
PHP.
I made a script so I could manually rotate some ads on our forum. You can find this script in the attachment. So, what does this script? First some ads are defined. This is done with an <<< EOF .. EOF; structure, so I can just paste the HTML code. Then there is specified an [...]
For the myp2p website, we are running on lighttpd with fastcgi php5. To improve performance, we installed xcache, a PHP opcode cacher. Xcache seems to improve the performance with about 20%, as far as that can be measured in just a percentage. Instead of using the oftenly chosen Apache, we’re going with the more controversial [...]