Skip to main content

Posts

Showing posts with the label drupal

Scaling Drupal

I am working on a Drupal based site and notice there are a lot of seperate CSS and js files. Wading though some of the code I can also see quite a few cases where many queries are used too. What techniques have you tried to improve the performance of Drupal and what modules (if any) do you use to improve the performance of Drupal 'out of the box'? Source: Tips4all

PHP is slower than it should be

Originally, I posted this on ServerFault ... but perhaps it is more of a PHP lingual question. I have a server with Dual Xeon Quad Core L5420 running at 2.5GHz. I've been optimizing my server, and have come to my final bottleneck: PHP. My very simple PHP script: ./test.php <?php print_r(posix_getpwuid(posix_getuid())); My not-so-scientific-because-they-don't-pay-attention-to-thread-locking-but-scientific-enough-to-give-me-a-reasonable-multithreaded-requests-per-second-result scripts: ./benchmark-php #!/bin/bash if [ -z $1 ]; then LIMIT=10 else LIMIT=$1 fi if [ -z $2 ]; then SCRIPT="index.php" else SCRIPT=$2 fi START=$(date +%s.%N) COUNT=0 while (( $COUNT < $LIMIT )) do php $SCRIPT > /dev/null COUNT=$(echo "$COUNT + 1" | bc) done END=$(date +%s.%N) DIFF=$(echo "$END - $START" | bc) REQS_PER_SEC=$(echo "scale=2; $COUNT / $DIFF" | bc) echo $REQS_PER_SEC ./really-benchmark-php #!/bin/bash if [ -z $1 ]; then