Search through our group's posts (events, discussions, jobs, etc.) and their comments here. Results are displayed in order of post date. Use the pager below to browse results.
Confused LEMP vs LAMP same vps hardware LEMP is slower?
My Nginx setup, granted very basic start to it, no real caching set up yet... LAMP has really no special additions to it kinda a out of the box install.
Drupal sets ups are clones on both systems.
command for testing on both ab -c10 -n1000 http://localhost/
nginx result
Server Software: nginx/1.0.9
Server Hostname: localhost
Server Port: 80
Document Path: /
Document Length: 3255 bytes
Concurrency Level: 10
Time taken for tests: 78.190 seconds
Complete requests: 1000
Failed requests: 0
High Performance Drupal 7 Authenticated User Benchmarks
Hi All,
I just thought you might be interested to see some performance benchmarks that I've produced recently whilst doing some work porting the Authcache module to D7.
I think the results are "pretty encouraging". What do you think :) ?
summary: ~1000 fold increase in authenticated user performance, 5 fold increase for anonymous users
1200 requests per second @ 2.5ms per request on a very modest single server.
|Benchmark|Requests|Concurrency|Total
Time Taken/s|Requests/s|Avg
Time Per
Request/ms|Time Per
Request
(across all)/ms|Longest
Request/ms|Completed
Optimizing MySQL (indexes) for non-developers
Environment
I’m in the process of setting up a CentOS VPS running a moderately used D6 site (approximately 1000 visits/day). I’ve installed the entire stack including Apache, MySQL 5.5, and PHP 5.3. The VPS has a 3.6Ghz dedicated CPU, and 2.2GB Memory (provided through VPS.net)
I’ve installed Memcache and APC, which seem to be working fine. I’ve tuned MySQL using mysqltuner.pl and tuning-primer.sh. My current my.cnf is posted below. All tables are InnoDB.
Problem
My current issue is that when logged in, various pages tend to be very slow (occasionally taking over 10 seconds to generate). I have devel’s query log functionality enabled and it does not seem to be one specific query that causes the problem- it seems to be random queries that sometimes take several seconds. This especially seems to happen with admin pages.
Indexes?
After doing a bit of research, I believe I need to index various database tables. This site has 22 content types and 73 fields defined. My questions is how do I know what tables to index and what fields to index? I've looked into the DBtuner module, but that only shows core fields (as opposed to the CCK fields).
Does anyone have any tips or suggestions?
Below is my current my.cnf
[mysqld]
#added MH 1-17-12
#comment this out after troubleshooting
log-queries-not-using-indexes
## General
datadir = /var/lib/mysql
tmpdir = /var/lib/mysqltmp
socket = /var/lib/mysql/mysql.sock
skip-name-resolve
sql-mode = NO_ENGINE_SUBSTITUTION
#event-scheduler = 1
## Cache
thread-cache-size = 16
table-open-cache = 4096
table-definition-cache = 2048
query-cache-size = 96M
query-cache-limit = 5M
## Per-thread Buffers
sort-buffer-size = 1M
read-buffer-size = 1M
read-rnd-buffer-size = 1M
join-buffer-size = 2M
## Temp Tables
tmp-table-size = 256M
max-heap-table-size = 256M
## Networking
back-log = 100
max-connections = 25
max-connect-errors = 10000
max-allowed-packet = 16M
interactive-timeout = 3600
wait-timeout = 600
bind-address = 127.0.0.1 #added mh 1-24-12 for phpmyadmin
### Storage Engines
#default-storage-engine = InnoDB
innodb = FORCE
## MyISAM
key-buffer-size = 64M
myisam-sort-buffer-size = 128M
## InnoDB
innodb-log-file-size = 100M
innodb-log-buffer-size = 4M
innodb-file-per-table = 1
#innodb-open-files = 300
innodb_flush_log_at_trx_commit = 2
innodb_additional_mem_pool_size = 20M
# InnoDB caches. Increase if needed (defaults to 8M, should use as much as is available). MH 1-25-12
innodb_buffer_pool_size = 1024M
innodb_flush_method = O_DIRECT
## Replication
server-id = 1
#log-bin = /var/lib/mysqllogs/bin-log
#relay-log = /var/lib/mysqllogs/relay-log
relay-log-space-limit = 16G
expire-logs-days = 7
#read-only = 1
#sync-binlog = 1
#log-slave-updates = 1
#binlog-format = STATEMENT
#auto-increment-offset = 1
#auto-increment-increment = 2
## Logging
log-output = FILE
slow-query-log = 1
slow-query-log-file = /var/lib/mysqllogs/slow-log
log-slow-slave-statements
long-query-time = 2
[mysqld_safe]
log-error = /var/log/mysqld.log
open-files-limit = 65535
[mysql]
no-auto-rehashApache + Varnish : having both on port 80
Hi,
Turned out I can't replicate the problem defined down there, but I guess it would've been solved thanks to Advagg. I now have an entirely different problem.
I have several virtualhosts on Apache, some of them will not be served with Varnish, but all listen to port 80.
So, the question is, how can I have Apache listening on port 80 for some virtualhosts, and Varnish listening on port 80 for other virtualhosts?
I'm having a weird problem and I can't get to solve it.
Firstly, here is the setup :
<
ul>
Read moreNginx static file cache or Varnish in front?
I have used varnish quite a bit on my LAMP stacks and this deff helps quite a bit out for static files to serve up and keeps the load off of apache.
I hear good things about nginx static file caching so is their a need to put varnish up a head of it?
Read moregetimage vs direct url from apache
Assuming images gets re-sized when uploaded, why drupal uses getimage to include images and thumbs
if it is much faster to access the images directly through apache?
I always notice high cpu utilization when I load a page full of images.
How can I avoid this and include direct url to all my images?
thanks for any comments or suggestions.
Read moreOptimizing query
Hello
I have a query that is being called by drupal which takes about 18 secs to execute and loads the mysql server with 99%cpu usage.
The query is below:
SELECT DISTINCT c.*
FROM
comment c
INNER JOIN node n ON n.nid = c.nid
INNER JOIN node_access na ON na.nid = n.nid
WHERE (c.status = '1') AND (n.status = '1') AND(( (na.gid = '0') AND (na.realm = 'all') )OR( (na.gid = '1') AND (na.realm = 'forum_access') ))AND (na.grant_view >= '1')
ORDER BY c.created DESC, c.cid DESC
LIMIT 10 OFFSET 0;explain for the above query is below:
Users and anonymous forms
I'm using varnish and have a couple of exiting modules which do searching. The way that they work is, using forms api, drupal_goto('mysearch/search+terms').
Here's the rub. I have to patch both core and these modules to keep them working with varnish. If I don't I get the notorious "This form is outdated. Reload the page and try again" message. I understand why—the form token is cached in the body of the document, and fails to validate for additional users. I'm a bit at a loss on the best solution for this.
Read moreRFC: Parallel page rendering via ESI fragment caching using HTTPRL non blocking http requests.
The HTTP Parallel Request Library module COULD be used to make Multi process Drupal happen via http://drupal.org/project/esi. I think all that is needed are some minor changes to the ESI module so it will issue non blocking requests to the ESI fragments URLs and we have parallel page rendering.
Questions? What did I miss? Why is this a bad idea? etc..
Read more

