Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
 Post subject: Out-of-memory situation
PostPosted: Mon Aug 01, 2011 7:35 pm 
Offline
Junior Member

Joined: Sun Jul 31, 2011 5:03 pm
Posts: 49
Website: http://www.clubpenguincheatsy.com/
AOL: thefiame12
Location: GA
I'm rather new to the linux environment, but I do have novice experience with most of it.

I am running a Wordpress blog on my server with Apache. The problem is, whenever there is increased traffic, the site crashes.

I contacted support and this is what they said:

Quote:
tparker
1 minute ago Hello,

This downtime may be due to an out-of-memory situation. If you look at your console, you will see that your Linode is OOMing, meaning something inside your node is consuming all of the available virtual memory. You can see this for yourself by logging into Lish and viewing the console:

http://library.linode.com/linode-manage ... node-shell

You'll need to identify the culprit and adjust its configuration to prevent it from happening again. An excellent place to start is the Linode Library where you can find documentation on many topics including troubleshooting memory issues:

http://library.linode.com/troubleshooti ... networking

You can also get assistance from our active user community through the forums, IRC channel and our wiki:

http://www.linode.com/community/

Alternatively, if you find that you cannot optimize your configuration any further, it may be wise to purchase additional memory or resize to a larger Linode.

Please let us know if we can be of any additional assistance.

Regards,
Trevor


I have the Linode 512 at the moment. Is there anyway I could configure my server to run more efficiently?


Top
   
 Post subject:
PostPosted: Mon Aug 01, 2011 7:44 pm 
Offline
Senior Member
User avatar

Joined: Sat Aug 30, 2008 1:55 pm
Posts: 1739
Location: Rochester, New York
What is MaxClients currently set to? How do 'free -m' and 'ps aux' look?

_________________
Code:
/* TODO: need to add signature to posts */


Top
   
 Post subject:
PostPosted: Mon Aug 01, 2011 7:56 pm 
Offline
Junior Member

Joined: Sun Jul 31, 2011 5:03 pm
Posts: 49
Website: http://www.clubpenguincheatsy.com/
AOL: thefiame12
Location: GA
There aren't as many people on now, but here's the details you asked for:

MaxClients 150

Free M:
Quote:
total used free shared buffers cached
Mem: 675 264 411 0 15 97
-/+ buffers/cache: 151 524
Swap: 255 0 255


PS AUX:
Quote:
Warning: bad ps syntax, perhaps a bogus '-'? See http://procps.sf.net/faq.html
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
root 1 0.0 0.2 2736 1596 ? Ss 19:16 0:00 /sbin/init
root 2 0.0 0.0 0 0 ? S 19:16 0:00 [kthreadd]
root 3 0.0 0.0 0 0 ? S 19:16 0:00 [ksoftirqd/0]
root 4 0.0 0.0 0 0 ? S 19:16 0:00 [kworker/0:0]
root 5 0.0 0.0 0 0 ? S 19:16 0:00 [kworker/u:0]
root 6 0.0 0.0 0 0 ? S 19:16 0:00 [migration/0]
root 7 0.0 0.0 0 0 ? S 19:16 0:00 [migration/1]
root 8 0.0 0.0 0 0 ? S 19:16 0:00 [kworker/1:0]
root 9 0.0 0.0 0 0 ? S 19:16 0:00 [ksoftirqd/1]
root 10 0.0 0.0 0 0 ? S 19:16 0:00 [migration/2]
root 11 0.0 0.0 0 0 ? S 19:16 0:00 [kworker/2:0]
root 12 0.0 0.0 0 0 ? S 19:16 0:00 [ksoftirqd/2]
root 13 0.0 0.0 0 0 ? S 19:16 0:00 [migration/3]
root 14 0.0 0.0 0 0 ? S 19:16 0:00 [kworker/3:0]
root 15 0.0 0.0 0 0 ? S 19:16 0:00 [ksoftirqd/3]
root 16 0.0 0.0 0 0 ? S< 19:16 0:00 [khelper]
root 17 0.0 0.0 0 0 ? S 19:16 0:00 [kworker/u:1]
root 21 0.0 0.0 0 0 ? S 19:16 0:00 [xenwatch]
root 22 0.0 0.0 0 0 ? S 19:16 0:00 [xenbus]
root 142 0.0 0.0 0 0 ? S 19:16 0:00 [sync_supers]
root 144 0.0 0.0 0 0 ? S 19:16 0:00 [bdi-default]
root 146 0.0 0.0 0 0 ? S< 19:16 0:00 [kblockd]
root 156 0.0 0.0 0 0 ? S< 19:16 0:00 [md]
root 240 0.0 0.0 0 0 ? S< 19:16 0:00 [rpciod]
root 241 0.0 0.0 0 0 ? S 19:16 0:00 [kworker/2:1]
root 271 0.0 0.0 0 0 ? S 19:16 0:00 [kswapd0]
root 272 0.0 0.0 0 0 ? SN 19:16 0:00 [ksmd]
root 273 0.0 0.0 0 0 ? S 19:16 0:00 [fsnotify_mark]
root 277 0.0 0.0 0 0 ? S 19:16 0:00 [ecryptfs-kthr]
root 279 0.0 0.0 0 0 ? S< 19:16 0:00 [nfsiod]
root 282 0.0 0.0 0 0 ? S 19:16 0:00 [jfsIO]
root 283 0.0 0.0 0 0 ? S 19:16 0:00 [jfsCommit]
root 284 0.0 0.0 0 0 ? S 19:16 0:00 [jfsCommit]
root 285 0.0 0.0 0 0 ? S 19:16 0:00 [jfsCommit]
root 286 0.0 0.0 0 0 ? S 19:16 0:00 [jfsCommit]
root 287 0.0 0.0 0 0 ? S 19:16 0:00 [jfsSync]
root 288 0.0 0.0 0 0 ? S< 19:16 0:00 [xfs_mru_cache]
root 289 0.0 0.0 0 0 ? S< 19:16 0:00 [xfslogd]
root 290 0.0 0.0 0 0 ? S< 19:16 0:00 [xfsdatad]
root 291 0.0 0.0 0 0 ? S< 19:16 0:00 [xfsconvertd]
root 292 0.0 0.0 0 0 ? S< 19:16 0:00 [crypto]
root 854 0.0 0.0 0 0 ? S 19:16 0:00 [khvcd]
root 967 0.0 0.0 0 0 ? S< 19:16 0:00 [kpsmoused]
root 985 0.0 0.0 0 0 ? S 19:16 0:00 [kworker/0:1]
root 996 0.0 0.0 0 0 ? S 19:16 0:00 [kjournald]
root 1000 0.0 0.0 0 0 ? S 19:16 0:00 [kworker/1:1]
root 1006 0.0 0.0 0 0 ? S 19:16 0:00 [kworker/3:1]
root 1022 0.0 0.1 2500 872 ? S 19:16 0:00 upstart-udev-br
root 1024 0.0 0.0 2368 604 ? S<s 19:16 0:00 udevd --daemon
root 1163 0.0 0.0 2364 588 ? S< 19:16 0:00 udevd --daemon
root 1169 0.0 0.0 2364 588 ? S< 19:16 0:00 udevd --daemon
syslog 1905 0.0 0.1 27428 1256 ? Sl 19:16 0:00 rsyslogd -c4
root 1934 0.0 0.1 2428 864 ? Ss 19:16 0:00 cron
root 2016 0.0 0.0 2288 256 ? Ss 19:16 0:00 dhclient3 -e IF
root 2255 0.0 0.1 3600 912 ? Ss 19:16 0:00 /usr/sbin/ntpd
ntpd 2256 0.0 0.1 3496 928 ? S 19:16 0:00 /usr/sbin/ntpd
root 2264 0.0 0.3 5600 2120 ? Ss 19:16 0:00 /usr/sbin/sshd
root 2275 0.0 0.0 0 0 ? S 19:16 0:00 [flush-202:0]
105 2411 0.0 0.1 6700 884 ? Ss 19:16 0:00 /usr/sbin/exim4
root 2489 0.0 1.7 59652 12200 ? Ss 19:16 0:00 /usr/sbin/apach
root 2493 0.0 0.1 2996 964 ? SNs 19:16 0:01 /usr/sbin/prelo
root 2507 0.0 0.0 1840 560 hvc0 Ss+ 19:16 0:00 /sbin/getty -8
mysql 2708 0.0 2.9 131432 20232 ? Ssl 19:17 0:01 /usr/sbin/mysql
www-data 4797 0.1 4.5 69688 31772 ? S 19:35 0:01 /usr/sbin/apach
www-data 5503 0.2 5.6 74708 38904 ? S 19:41 0:02 /usr/sbin/apach
www-data 5542 0.1 4.9 71696 34016 ? S 19:41 0:01 /usr/sbin/apach
www-data 5615 0.1 4.4 68084 30468 ? S 19:42 0:00 /usr/sbin/apach
www-data 5616 0.1 4.4 68340 30580 ? S 19:42 0:00 /usr/sbin/apach
www-data 5868 0.2 5.4 75900 37468 ? S 19:45 0:01 /usr/sbin/apach
www-data 6089 0.1 4.3 68240 29948 ? S 19:47 0:00 /usr/sbin/apach
www-data 6125 0.0 4.0 66096 27956 ? S 19:47 0:00 /usr/sbin/apach
root 6653 0.0 0.4 8540 2804 ? Ss 19:52 0:00 sshd: root@nott
root 6711 0.0 0.1 2052 848 ? Ss 19:52 0:00 /usr/lib/openss
www-data 6784 0.1 3.7 65604 25616 ? S 19:52 0:00 /usr/sbin/apach
www-data 6785 0.2 3.9 66248 27368 ? S 19:52 0:00 /usr/sbin/apach
root 6786 0.0 0.4 8408 2804 ? Ss 19:53 0:00 sshd: root@pts/
root 6878 0.0 0.2 4628 1888 pts/0 Ss 19:53 0:00 -bash
www-data 6961 0.0 1.0 60032 7184 ? S 19:54 0:00 /usr/sbin/apach
root 6962 0.0 0.1 2764 1056 pts/0 R+ 19:54 0:00 ps -aux



Top
   
 Post subject:
PostPosted: Mon Aug 01, 2011 10:51 pm 
Offline
Senior Member
User avatar

Joined: Sat Aug 30, 2008 1:55 pm
Posts: 1739
Location: Rochester, New York
Take a look at:

http://library.linode.com/troubleshooting/memory-networking#sph_apache-2-low-memory-settings

mod_php forces Apache to use a non-optimal method of handling requests, which means you need to lower MaxClients drastically (and probably disable Keepalive) to keep your server from buckling at the slightest increase in traffic.

To pick a random number, try MaxClients 20

_________________
Code:
/* TODO: need to add signature to posts */


Top
   
 Post subject:
PostPosted: Tue Aug 02, 2011 12:56 am 
Offline
Junior Member

Joined: Sun Jul 31, 2011 5:03 pm
Posts: 49
Website: http://www.clubpenguincheatsy.com/
AOL: thefiame12
Location: GA
Will this allow high traffic?

Alright I changed the apache conf to this
Code:
#
# Based upon the NCSA server configuration files originally by Rob McCool.
#
# This is the main Apache server configuration file.  It contains the
# configuration directives that give the server its instructions.
# See http://httpd.apache.org/docs/2.2/ for detailed information about
# the directives.
#
# Do NOT simply read the instructions in here without understanding
# what they do.  They're here only as hints or reminders.  If you are unsure
# consult the online docs. You have been warned. 
#
# The configuration directives are grouped into three basic sections:
#  1. Directives that control the operation of the Apache server process as a
#     whole (the 'global environment').
#  2. Directives that define the parameters of the 'main' or 'default' server,
#     which responds to requests that aren't handled by a virtual host.
#     These directives also provide default values for the settings
#     of all virtual hosts.
#  3. Settings for virtual hosts, which allow Web requests to be sent to
#     different IP addresses or hostnames and have them handled by the
#     same Apache server process.
#
# Configuration and logfile names: If the filenames you specify for many
# of the server's control files begin with "/" (or "drive:/" for Win32), the
# server will use that explicit path.  If the filenames do *not* begin
# with "/", the value of ServerRoot is prepended -- so "/var/log/apache2/foo.log"
# with ServerRoot set to "" will be interpreted by the
# server as "//var/log/apache2/foo.log".
#

### Section 1: Global Environment
#
# The directives in this section affect the overall operation of Apache,
# such as the number of concurrent requests it can handle or where it
# can find its configuration files.
#

#
# ServerRoot: The top of the directory tree under which the server's
# configuration, error, and log files are kept.
#
# NOTE!  If you intend to place this on an NFS (or otherwise network)
# mounted filesystem then please read the LockFile documentation (available
# at <URL:http://httpd.apache.org/docs-2.1/mod/mpm_common.html#lockfile>);
# you will save yourself a lot of trouble.
#
# Do NOT add a slash at the end of the directory path.
#
ServerRoot "/etc/apache2"

#
# The accept serialization lock file MUST BE STORED ON A LOCAL DISK.
#
#<IfModule !mpm_winnt.c>
#<IfModule !mpm_netware.c>
LockFile /var/lock/apache2/accept.lock
#</IfModule>
#</IfModule>

#
# PidFile: The file in which the server should record its process
# identification number when it starts.
# This needs to be set in /etc/apache2/envvars
#
PidFile ${APACHE_PID_FILE}

#
# Timeout: The number of seconds before receives and sends time out.
#
Timeout 300

#
# KeepAlive: Whether or not to allow persistent connections (more than
# one request per connection). Set to "Off" to deactivate.
#
KeepAlive Off

#
# MaxKeepAliveRequests: The maximum number of requests to allow
# during a persistent connection. Set to 0 to allow an unlimited amount.
# We recommend you leave this number high, for maximum performance.
#
MaxKeepAliveRequests 100

#
# KeepAliveTimeout: Number of seconds to wait for the next request from the
# same client on the same connection.
#
KeepAliveTimeout 15

##
## Server-Pool Size Regulation (MPM specific)
##

# prefork MPM
# StartServers: number of server processes to start
# MinSpareServers: minimum number of server processes which are kept spare
# MaxSpareServers: maximum number of server processes which are kept spare
# MaxClients: maximum number of server processes allowed to start
# MaxRequestsPerChild: maximum number of requests a server process serves
<IfModule mpm_prefork_module>
    StartServers          5
    MinSpareServers       5
    MaxSpareServers      10
    MaxClients           20
    MaxRequestsPerChild   0
</IfModule>

# worker MPM
# StartServers: initial number of server processes to start
# MaxClients: maximum number of simultaneous client connections
# MinSpareThreads: minimum number of worker threads which are kept spare
# MaxSpareThreads: maximum number of worker threads which are kept spare
# ThreadsPerChild: constant number of worker threads in each server process
# MaxRequestsPerChild: maximum number of requests a server process serves
<IfModule mpm_worker_module>
    StartServers          2
    MinSpareThreads      25
    MaxSpareThreads      75
    ThreadLimit          64
    ThreadsPerChild      25
    MaxClients           20
    MaxRequestsPerChild   0
</IfModule>

# event MPM
# StartServers: initial number of server processes to start
# MaxClients: maximum number of simultaneous client connections
# MinSpareThreads: minimum number of worker threads which are kept spare
# MaxSpareThreads: maximum number of worker threads which are kept spare
# ThreadsPerChild: constant number of worker threads in each server process
# MaxRequestsPerChild: maximum number of requests a server process serves
<IfModule mpm_event_module>
    StartServers          2
    MaxClients           20
    MinSpareThreads      25
    MaxSpareThreads      75
    ThreadLimit          64
    ThreadsPerChild      25
    MaxRequestsPerChild   0
</IfModule>

# These need to be set in /etc/apache2/envvars
User ${APACHE_RUN_USER}
Group ${APACHE_RUN_GROUP}

#
# AccessFileName: The name of the file to look for in each directory
# for additional configuration directives.  See also the AllowOverride
# directive.
#

AccessFileName .htaccess

#
# The following lines prevent .htaccess and .htpasswd files from being
# viewed by Web clients.
#
<Files ~ "^\.ht">
    Order allow,deny
    Deny from all
    Satisfy all
</Files>

#
# DefaultType is the default MIME type the server will use for a document
# if it cannot otherwise determine one, such as from filename extensions.
# If your server contains mostly text or HTML documents, "text/plain" is
# a good value.  If most of your content is binary, such as applications
# or images, you may want to use "application/octet-stream" instead to
# keep browsers from trying to display binary files as though they are
# text.
#
DefaultType text/plain


#
# HostnameLookups: Log the names of clients or just their IP addresses
# e.g., www.apache.org (on) or 204.62.129.132 (off).
# The default is off because it'd be overall better for the net if people
# had to knowingly turn this feature on, since enabling it means that
# each client request will result in AT LEAST one lookup request to the
# nameserver.
#
HostnameLookups Off

# ErrorLog: The location of the error log file.
# If you do not specify an ErrorLog directive within a <VirtualHost>
# container, error messages relating to that virtual host will be
# logged here.  If you *do* define an error logfile for a <VirtualHost>
# container, that host's errors will be logged there and not here.
#
ErrorLog /var/log/apache2/error.log

#
# LogLevel: Control the number of messages logged to the error_log.
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
#
LogLevel warn

# Include module configuration:
Include /etc/apache2/mods-enabled/*.load
Include /etc/apache2/mods-enabled/*.conf

# Include all the user configurations:
Include /etc/apache2/httpd.conf

# Include ports listing
Include /etc/apache2/ports.conf

#
# The following directives define some format nicknames for use with
# a CustomLog directive (see below).
# If you are behind a reverse proxy, you might want to change %h into %{X-Forwarded-For}i
#
LogFormat "%v:%p %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined
LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %O" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent

#
# Define an access log for VirtualHosts that don't define their own logfile
CustomLog /var/log/apache2/other_vhosts_access.log vhost_combined


# Include of directories ignores editors' and dpkg's backup files,
# see README.Debian for details.

# Include generic snippets of statements
Include /etc/apache2/conf.d/

# Include the virtual host configurations:
Include /etc/apache2/sites-enabled/


Top
   
PostPosted: Tue Aug 02, 2011 1:45 am 
Offline
Junior Member

Joined: Wed Jan 05, 2011 7:55 am
Posts: 29
Website: http://www.zeropointproductions.co.uk
Location: UK
theflame12 wrote:
I have set up a Wordpress blog using Ubuntu 10.04 LTS

It runs, but a couple of scripts don't work here and there and it can be sort of unresponsive at times.

Can someone give me like a guide on how to set up my server to run Wordpress efficiently?

Basically like, how to install PHP, MYSQL, etc. What other things do I need to do to make sure it runs at it's best so that it supports all my scripts, etc.

Please and thanks.


For ease I would use the lamp stack script if you are new to all of this. Then I would install or enable the proformance mods such as,

so the follow ing mods

mod_deflate (compresses files for delivery)
mod_mem_cache (holds you site in heap memory for fast speeds)
mod_expires(leverages browser cache)
mod_pagespeed(still in a sort of beta, but does speed things up)

I would also search for the W3 total cache plugin for wordpress this will speed things up a great deal. I will say that some of the word press components do not like to be cached, for example the "featured post / image thing on the main page of the Arras theme"

I would also go to gtmetrix.com to test yours sites speed and other aspects of your site that will need optimizing.

Other things to concider are;

image size keep this as low as you can without distroying the look of the image, "yahoo smushit" is a great tool for this.

minify the following; (can be done with w3 - total cache, but you will have to enable each thing to be minified one by one to make sure what you minify can be minified.

css
html
php
javascript
and any other scripts that can be as this will speed up your site

Keeps your scripts at the bottom of the page were you can Smile that way the user will see something first and will be only waiting for the background stuff to load.

Try to keep you scripts images and large file size down to a minimum.

and apply the rulles to your .htaccess files to enable the filtering and use of the mods above to you sites content.

I have played around with the setting for apache but I would not suggest this unless you are getting 15k hits a week.

I have a main site with a lot of visual content at
www.zeropointproductionsco.uk and this is wordpress with the above installed.

I have another site that is a work in progress that I am making becuase I want a fast site rather depending on wordpress. using the above I have got the site to load really quick. www.zppwebpress.co.uk

I hope this helps you From James


Top
   
 Post subject:
PostPosted: Tue Aug 02, 2011 9:40 am 
Offline
Junior Member

Joined: Sun Jul 31, 2011 5:03 pm
Posts: 49
Website: http://www.clubpenguincheatsy.com/
AOL: thefiame12
Location: GA
Hmmm, things still seem the same. Maybe a little faster I guess.

Should I still change my apache conf?


Top
   
 Post subject: Whats your site URL
PostPosted: Tue Aug 02, 2011 10:52 am 
Offline
Junior Member

Joined: Wed Jan 05, 2011 7:55 am
Posts: 29
Website: http://www.zeropointproductions.co.uk
Location: UK
Whats you site url and how many visitor's are you getting ??

I have a friend that uses the techniques to cope with 25k a day in some cases.

It is a difficult thing bench marking sites

Code:
ab -n 500 -c 10 http://www.yoursite.com


try that command to see how many pages per second your site can serve, Also did you wipe and start from scratch ?

also these are the setting I have for the keep alive in the apache.conf

Code:
#
# Timeout: The number of seconds before receives and sends time out.
#
Timeout 300

#
# KeepAlive: Whether or not to allow persistent connections (more than
# one request per connection). Set to "Off" to deactivate.
#
KeepAlive On

#
# MaxKeepAliveRequests: The maximum number of requests to allow
# during a persistent connection. Set to 0 to allow an unlimited amount.
# We recommend you leave this number high, for maximum performance.
#
MaxKeepAliveRequests 100

#
# KeepAliveTimeout: Number of seconds to wait for the next request from the
# same client on the same connection.
#
KeepAliveTimeout 10



and the max clients

Code:
<IfModule mpm_event_module>
    StartServers          2
    MaxClients          150
    MinSpareThreads      25
    MaxSpareThreads      75
    ThreadLimit          64
    ThreadsPerChild      25
    MaxRequestsPerChild   0
</IfModule>


Code:
#Expires headers for Yahoo slow

ExpiresActive On


Top
   
 Post subject:
PostPosted: Tue Aug 02, 2011 10:54 am 
Offline
Junior Member

Joined: Sun Jul 31, 2011 5:03 pm
Posts: 49
Website: http://www.clubpenguincheatsy.com/
AOL: thefiame12
Location: GA
Site URL:
http://www.clubpenguincheatsy.com/

We average about 1k-6k a day depending on the updates.

Yes. The lamp script didn't seem to be working so I installed Lamp myself with the mods you gave me.


Top
   
 Post subject:
PostPosted: Tue Aug 02, 2011 11:08 am 
Offline
Senior Member
User avatar

Joined: Sat Aug 30, 2008 1:55 pm
Posts: 1739
Location: Rochester, New York
theflame12 wrote:
Will this allow high traffic?


It will, hopefully, allow service to degrade gracefully under high traffic. Instead of trying to fork more processes to handle new requests immediately, it will enqueue them.

As far as site performance goes, something like Chrome's developer tools or Firebug for Firefox will give you a timeline for page loading (right click -> Inspect Element -> Network tab). This is invaluable data for figuring out what to optimize.

_________________
Code:
/* TODO: need to add signature to posts */


Top
   
 Post subject:
PostPosted: Tue Aug 02, 2011 11:09 am 
Offline
Junior Member

Joined: Sun Jul 31, 2011 5:03 pm
Posts: 49
Website: http://www.clubpenguincheatsy.com/
AOL: thefiame12
Location: GA
So the best thing to do would be to use these settings when I expect high traffic?


Top
   
 Post subject:
PostPosted: Tue Aug 02, 2011 11:17 am 
Offline
Senior Member

Joined: Thu May 21, 2009 3:19 am
Posts: 336
Use them all the time. I just looked at your site using page speed and yslow (Firebug extensions for Firefox) and you've got a lot of improvements you can do.

First, you want a faster site, stop loading so much external garbage.


Top
   
 Post subject:
PostPosted: Tue Aug 02, 2011 11:21 am 
Offline
Junior Member

Joined: Sun Jul 31, 2011 5:03 pm
Posts: 49
Website: http://www.clubpenguincheatsy.com/
AOL: thefiame12
Location: GA
Lol...

External garbage? As in?


Top
   
 Post subject: mmm very odd
PostPosted: Tue Aug 02, 2011 11:24 am 
Offline
Junior Member

Joined: Wed Jan 05, 2011 7:55 am
Posts: 29
Website: http://www.zeropointproductions.co.uk
Location: UK
Ok well I have ran a test using the gtmetrix site and it would appear that there is still some more optimisation that can be done

http://gtmetrix.com/reports/www.clubpen ... m/l4PUuVNY

I would get the code right in the site I know that my install of wordpress is not great for this but still when your site fails so badly when using css would suggest to me that the code really does need sorting out in places.

I cannot post the error list on here as I would concider it to be spammy of me to do so.

I really would sort out your css as most of the page speed will be lost in there in your case.

Here is what gtmetrix had to say about your css

Code:
http://www.clubpenguincheatsy.com/?bfa_ata_file=css has 254 very inefficient rules, 90 inefficient rules, and 12 potentially inefficient uses of :hover out of 340 total rules.


you also have some scripts that could be further decreased in size,

There are 6 JavaScript files served from pagead2.googlesyndication.com. They should be combined into as few files as possible.
THIS IS THE EXTERNAL GARBAGE ! that waldo talks about I guess

http://pagead2.googlesyndication.com/pa ... n_embed.js
http://pagead2.googlesyndication.com/pa ... raphics.js
http://pagead2.googlesyndication.com/pa ... 719/abg.js
http://pagead2.googlesyndication.com/pa ... ds_impl.js
http://pagead2.googlesyndication.com/pagead/show_ads.js
http://pagead2.googlesyndication.com/pagead/sma8.js

These external js files will slow your site loads as it will have to call the css for these parts of your page from another server. I really would put them if possible on your own server.

It does look like at a first glance that you have not got the correct rules in your .htaccess file as well. A you are not utilising the browser cache.

here is what I would expect to see in your .htaccess file after installing and configuring w3 total cache and after installing and configuring the apache2 mods

Code:
# BEGIN W3TC Browser Cache
<IfModule mod_mime.c>
    AddType text/css .css
    AddType application/x-javascript .js
    AddType text/html .html .htm
    AddType text/richtext .rtf .rtx
    AddType image/svg+xml .svg .svgz
    AddType text/plain .txt
    AddType text/xsd .xsd
    AddType text/xsl .xsl
    AddType text/xml .xml
    AddType video/asf .asf .asx .wax .wmv .wmx
    AddType video/avi .avi
    AddType image/bmp .bmp
    AddType application/java .class
    AddType video/divx .divx
    AddType application/msword .doc .docx
    AddType application/x-msdownload .exe
    AddType image/gif .gif
    AddType application/x-gzip .gz .gzip
    AddType image/x-icon .ico
    AddType image/jpeg .jpg .jpeg .jpe
    AddType application/vnd.ms-access .mdb
    AddType audio/midi .mid .midi
    AddType video/quicktime .mov .qt
    AddType audio/mpeg .mp3 .m4a
    AddType video/mp4 .mp4 .m4v
    AddType video/mpeg .mpeg .mpg .mpe
    AddType application/vnd.ms-project .mpp
    AddType application/vnd.oasis.opendocument.database .odb
    AddType application/vnd.oasis.opendocument.chart .odc
    AddType application/vnd.oasis.opendocument.formula .odf
    AddType application/vnd.oasis.opendocument.graphics .odg
    AddType application/vnd.oasis.opendocument.presentation .odp
    AddType application/vnd.oasis.opendocument.spreadsheet .ods
    AddType application/vnd.oasis.opendocument.text .odt
    AddType audio/ogg .ogg
    AddType application/pdf .pdf
    AddType image/png .png
    AddType application/vnd.ms-powerpoint .pot .pps .ppt .pptx
    AddType audio/x-realaudio .ra .ram
    AddType application/x-shockwave-flash .swf
    AddType application/x-tar .tar
    AddType image/tiff .tif .tiff
    AddType audio/wav .wav
    AddType audio/wma .wma
    AddType application/vnd.ms-write .wri
    AddType application/vnd.ms-excel .xla .xls .xlsx .xlt .xlw
    AddType application/zip .zip
</IfModule>
<IfModule mod_expires.c>
    ExpiresActive On
    ExpiresByType text/css A31536000
    ExpiresByType application/x-javascript A31536000
    ExpiresByType text/html A3600
    ExpiresByType text/richtext A3600
    ExpiresByType image/svg+xml A3600
    ExpiresByType text/plain A3600
    ExpiresByType text/xsd A3600
    ExpiresByType text/xsl A3600
    ExpiresByType text/xml A3600
    ExpiresByType video/asf A31536000
    ExpiresByType video/avi A31536000
    ExpiresByType image/bmp A31536000
    ExpiresByType application/java A31536000
    ExpiresByType video/divx A31536000
    ExpiresByType application/msword A31536000
    ExpiresByType application/x-msdownload A31536000
    ExpiresByType image/gif A31536000
    ExpiresByType application/x-gzip A31536000
    ExpiresByType image/x-icon A31536000
    ExpiresByType image/jpeg A31536000
    ExpiresByType application/vnd.ms-access A31536000
    ExpiresByType audio/midi A31536000
    ExpiresByType video/quicktime A31536000
    ExpiresByType audio/mpeg A31536000
    ExpiresByType video/mp4 A31536000
    ExpiresByType video/mpeg A31536000
    ExpiresByType application/vnd.ms-project A31536000
    ExpiresByType application/vnd.oasis.opendocument.database A31536000
    ExpiresByType application/vnd.oasis.opendocument.chart A31536000
    ExpiresByType application/vnd.oasis.opendocument.formula A31536000
    ExpiresByType application/vnd.oasis.opendocument.graphics A31536000
    ExpiresByType application/vnd.oasis.opendocument.presentation A31536000
    ExpiresByType application/vnd.oasis.opendocument.spreadsheet A31536000
    ExpiresByType application/vnd.oasis.opendocument.text A31536000
    ExpiresByType audio/ogg A31536000
    ExpiresByType application/pdf A31536000
    ExpiresByType image/png A31536000
    ExpiresByType application/vnd.ms-powerpoint A31536000
    ExpiresByType audio/x-realaudio A31536000
    ExpiresByType application/x-shockwave-flash A31536000
    ExpiresByType application/x-tar A31536000
    ExpiresByType image/tiff A31536000
    ExpiresByType audio/wav A31536000
    ExpiresByType audio/wma A31536000
    ExpiresByType application/vnd.ms-write A31536000
    ExpiresByType application/vnd.ms-excel A31536000
    ExpiresByType application/zip A31536000
</IfModule>
<IfModule mod_deflate.c>
    <IfModule mod_setenvif.c>
        BrowserMatch ^Mozilla/4 gzip-only-text/html
        BrowserMatch ^Mozilla/4\.0[678] no-gzip
        BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
        BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html
    </IfModule>
    <IfModule mod_headers.c>
        Header append Vary User-Agent env=!dont-vary
    </IfModule>
    <IfModule mod_filter.c>
        AddOutputFilterByType DEFLATE text/css application/x-javascript text/html text/richtext image/svg+xml text/plain text/xsd text/xsl text/xml image/x-icon
    </IfModule>
</IfModule>
<FilesMatch "\.(css|js|CSS|JS)$">
    <IfModule mod_headers.c>
        Header set Pragma "public"
        Header set Cache-Control "public, must-revalidate, proxy-revalidate"
    </IfModule>
    FileETag MTime Size
    <IfModule mod_headers.c>
         Header set X-Powered-By "W3 Total Cache/0.9.2.3"
    </IfModule>
</FilesMatch>
<FilesMatch "\.(html|htm|rtf|rtx|svg|svgz|txt|xsd|xsl|xml|HTML|HTM|RTF|RTX|SVG|SVGZ|TXT|XSD|XSL|XML)$">
    <IfModule mod_headers.c>
        Header set Pragma "public"
        Header set Cache-Control "public, must-revalidate, proxy-revalidate"
    </IfModule>
    FileETag MTime Size
    <IfModule mod_headers.c>
         Header set X-Powered-By "W3 Total Cache/0.9.2.3"
    </IfModule>
</FilesMatch>
<FilesMatch "\.(asf|asx|wax|wmv|wmx|avi|bmp|class|divx|doc|docx|exe|gif|gz|gzip|ico|jpg|jpeg|jpe|mdb|mid|midi|mov|qt|mp3|m4a|mp4|m4v|mpeg|mpg|mpe|mpp|odb|odc|odf|odg|odp|ods|odt|ogg|pdf|png|pot|pps|ppt|pptx|ra|ram|swf|tar|tif|tiff|wav|wma|wri|xla|xls|xlsx|xlt|xlw|zip|ASF|ASX|WAX|WMV|WMX|AVI|BMP|CLASS|DIVX|DOC|DOCX|EXE|GIF|GZ|GZIP|ICO|JPG|JPEG|JPE|MDB|MID|MIDI|MOV|QT|MP3|M4A|MP4|M4V|MPEG|MPG|MPE|MPP|ODB|ODC|ODF|ODG|ODP|ODS|ODT|OGG|PDF|PNG|POT|PPS|PPT|PPTX|RA|RAM|SWF|TAR|TIF|TIFF|WAV|WMA|WRI|XLA|XLS|XLSX|XLT|XLW|ZIP)$">
    <IfModule mod_headers.c>
        Header set Pragma "public"
        Header set Cache-Control "public, must-revalidate, proxy-revalidate"
    </IfModule>
    FileETag MTime Size
    <IfModule mod_headers.c>
         Header set X-Powered-By "W3 Total Cache/0.9.2.3"
    </IfModule>
</FilesMatch>
# END W3TC Browser Cache
# BEGIN W3TC Skip 404 error handling by WordPress for static files
<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_URI} !(robots\.txt|sitemap\.xml(\.gz)?)
    RewriteCond %{REQUEST_FILENAME} \.(css|js|html|htm|rtf|rtx|svg|svgz|txt|xsd|xsl|xml|asf|asx|wax|wmv|wmx|avi|bmp|class|divx|doc|docx|exe|gif|gz|gzip|ico|jpg|jpeg|jpe|mdb|mid|midi|mov|qt|mp3|m4a|mp4|m4v|mpeg|mpg|mpe|mpp|odb|odc|odf|odg|odp|ods|odt|ogg|pdf|png|pot|pps|ppt|pptx|ra|ram|swf|tar|tif|tiff|wav|wma|wri|xla|xls|xlsx|xlt|xlw|zip)$ [NC]
    RewriteRule .* - [L]
</IfModule>
# END W3TC Skip 404 error handling by WordPress for static files
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

# END WordPress

<IfModule mod_rewrite.c>
# for the re-write of the urls for wordpress

RewriteEngine On

RewriteBase /

RewriteRule ^index\.php$ - [L]

RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule . /index.php [L]

</IfModule>

# END WordPress

# Set Expires header to current time by default  turn this of while working on the site other wise file name changes will have to be made

ExpiresActive on

#ExpiresDefault "access plus 1 hour"

  <FilesMatch "\.(flv|ico|pdf|avi|mov|ppt|doc|mp3|wmv|wav)$">
   ExpiresDefault "access plus 3 days"
 </FilesMatch>
 <FilesMatch "\.(jpg|jpeg|png|gif|swf|bmp|)$">
  ExpiresDefault "access plus 3 days"
 </FilesMatch>

 <FilesMatch "\.(txt|xml|js|css)$">
  ExpiresDefault "access plus 3 days"
 </FilesMatch>

#disable eTag
FileETag none

#to remove the unwanted errors from the log

#php_flag apc.cache_by_default Off
#php_flag apc.enabled Off


You will have to add some things by hand as well that is why I have place a copy up here for you to check against.

also hoopycat is da man when it comes to this sorta thing he has been very helpful in the past. :)

Hope this helps


Top
   
 Post subject:
PostPosted: Tue Aug 02, 2011 11:41 am 
Offline
Junior Member

Joined: Sun Jul 31, 2011 5:03 pm
Posts: 49
Website: http://www.clubpenguincheatsy.com/
AOL: thefiame12
Location: GA
I've cut the site load time down by a second, it's just really the Google Ads that seem to be causing a lot of load time.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group