B O'Sullivan, Cork, Ireland
I was searching for a classifieds solution for ages and found Esvon
Classifieds. The software is excellent and can be used for many professional
online website projects and not only classifieds; i.e. Real Estate, Motors,
Jobs. It also supports taking online payments. Support from Esvon is
excellent and additional modules can also be purchased. Esvon also provide
customisation if you want to do something different! Overall, i'd give the
product 9.5 out of 10!
How can I make my application (website) run faster as a whole ?
Although your hosting provider may offer you to upgrade hosting package or replace server parts,
the latest hardware is often not the solution to website performance problems.
We can help you to find answer(s) to this question.
As a quick proof of our skills you can download demo version
of Esvon Classifieds with many modules. Have a quick look and let us know if you will find
anything worth a critical remark.
We carefully designed Esvon Classifieds and used the best
known to us programming methodologies to make it solid
and very fast application.
It was noticed that after medium or extensive functionality customization
probably by junior developers (php/mysql custom programming) the website can run
slower bringing server to knees and eating up to 100% of CPU time or RAM.
In most cases the conclusion was simple: always hire experienced professionals
for custom programming services if you have real plans for your website.
Such developers will take into account many different coding aspects including
general website performance and database architecture.
If you have similar issues, you'll have to address them sooner or later.
First question before doing anything, is this server dedicated to your website
or other websites are hosted as well and they could cause server performance problems ?
If you are sure that your website causes this,
PHP code audit and MySQL database structure / SQL queries optimization can help.
As it was mentioned, certain custom programming changes could affect overall performance and
slow down website when traffic increases occur.
How can we help ?
We can perform performance audit to find possible bottlenecks (tune the slowest SQL queries,
eliminate unnecessary SQL queries, create missing or remove redundant table indexes,
optimize CPU intensive PHP code, etc)
and make the necessary database structure / PHP code changes to ensure the software works as fast as possible.
We should be able to find out the changes required to speed up the website as a whole and give you
a quote on these changes before doing them.
If you are interested in our services, please submit your request using Online HelpDesk
here.
If you have made efforts to boost the performance by optimizing your queries and your application code,
we'd like to share some thoughts regarding PHP-based website performance optimization with you and really hope
you will find something useful to think about and to make further research before making actual changes
in your server environment.
There are number of server-level and language-level tunings for high-traffic websites
(OS, MySQL, hardware related) that you (or your host admin)
can try to ensure that an application performs at its best, i.e. :
1/ Use PHP 5.3.
As a major step ahead, the new PHP 5.3 version offers a significant performance gain
over previous PHP versions - try Google search on "PHP 5.3 performance" and you will get some real digits.
2/ Install Compiler Cache (eAccelerator).
This step will reduce server load and increase the speed of your PHP code.
For complex php applications like Esvon Classifieds it can provide significant performance improvement.
eAccelerator is a free open-source PHP accelerator and allows to serve PHP content about 3 times faster (it may vary).
Hint: Zend Optimizer should be installed after eAccelerator in php.ini ( see here )
3/ Use MySQL 5.1.x.
There are enough things that run faster on recent MySQL versions
(improved SQL query optimizer behaviour, query cache if enabled, SQL_CALC_FOUND_ROWS option, full-text indexing, more efficient SQL syntax in some cases, etc), our software automatically uses some of them if they are available.
4/ Client side - caching
All static content (HTML pages, images, etc) can be cached in the browser by Expires header and Cache-Control
header for 30-45 days (look at "mod_expires" Apache module). Client-side cache can significantly improve the
second visit, you'll get happy returning visitors and reduced bandwidth usage.
5/ Use Content Compression.
It provides 30-50% bandwidth usage reduction and even small overall performance increase.
You can consider using Apache module mod_deflate (for Apache 1.3.x) or mod_gzip.
6/ MySQL tweaks.
6a/ Query cache and buffer sizes.
Make sure MySQL query cache is enabled and has proper size (you can start with 4MB or 64MB depending on the RAM available,
use "query_cache_size" parameter in my.cnf).
Pay attention to "key_buffer" and "table_cache" parameters, they are important and shouldn't be too small.
If RAM allows, make sure MyISAM key buffer size in MySQL ("key_buffer_size" option) is large enough
to hold the indexes of your most actively used tables
(calculate the total size of your .MYI files for the tables).
6b/ InnoDB (selective).
This option is not for low end VPS, where InnoDB should be disabled to save memory.
In MySQL it is wise to change
type of certain tables from MyISAM to InnoDB. MyISAM uses table-level blocking, InnoDB uses row-level blocking.
Conversion to InnoDB is useful for tables which experience many SQL updates (i.e. more than 20% write to 80% reads,
e.g., session, hits, accesslog tables). Don't forget to balance the amount of RAM between MyISAM and InnoDB because
the buffers for each are configured separately.
6c/ Disable MySQL DNS Hostname Lookup.
Add line "skip-name-resolve" in my.cnf, but you can only use IP numbers in the MySQL Grant table if you activate this option.
7/ If you have database server and web server running on the same host,
consider configuration from 2 independent servers for MySQL and Apache.
8/ Use Nginx for font-end.
Nginx (lightweight web server) usage for front-end and Apache for back-end is very beneficial for
heavily loaded servers. Nginx serves static content very efficiently, acts as reverse proxy for dynamic
content (Apache/PHP) and allows to reduce memory consumption (RAM requirements).
You can start thinking about this model if your server load exceeds 10 http-requests per second.
Serving static content with Apache and mod_php results in the expensive portions of the process being squandered
for high-traffic environments.
Reverse proxy (Proxy Cache, HTTP accelerator) is an additional server that sits in between the end user and
the PHP application to reduce PHP processes time.
The proxy instance can simply run as a 2nd server instance on the same machine (or be on a dedicated machine).
9/ TMPFS.
Consider TMPFS usage, virtual memory is much faster than a persistent storage device.
10/ Web cluster usage.
It provides much better redundancy, capacity and load balancing compared to a single Web server.
But web applications which run on a single Web server perfectly may need certain tuning to work as expected at a web cluster.
Sincere wishes
to outstanding website performance