PDA

View Full Version : Speed and Optimization


kd6lor
2nd of October 2004 (Sat), 20:44
My ISP had informed me that they were going to move my website to a newer "faster" server because of the amount of traffic I had been getting lately. It sounded like a good idea, but afterwards, my server seemed slower than ever. It was interesting because if you clicked on a gallery, it seemed to think about it for a long time, then fire off the pictures very quickly as if the data transfer was good, but the database was slow... This led me to remember the performance statistics page on EE. The performance for Photo Page My SQL was all red bar, and List Page statistics were quite red for both PHP and My SQL. In any case, I ran the optimize page and boy did it speed up. The image transfer is faster, but even better than that, it doesn't take a long time to start sending the images.

For those of you who don't want to bother reading the above, visit your statistics page, and consider visiting your optimizing page.


If you have a fast connection, hit my site and let me know if you think it is doing well. Thanks!


Paul

Pekka
3rd of October 2004 (Sun), 10:33
Your situation is very common. System gets updated, admin uses mysqldump for transferring databases and then forgets to reload table indexes. EE's optimize command does that.

Your new server has MySQL 4 with table cache on, which helps a LOT in performance. It can reduce list page query time to 1/100 or more.

I have also MySQL 4/PHP 5 server under testing and tweaking and it will replace this one in couple of weeks. When testing it I have noticed that sometimes MySQL query cache will not cache some queries, so I have done an additional internal query cache into EE which speeds selected queries (i.e. only those for which it is set for) to fraction of the original, even if MySQL's own cache do not. Other speed improvements I have tested is photo page image preload which is now inbuilt, and uncookied automatic intelligent purge system and much faster overall uncookied system. 1.5 release is coming "when it is fully ready" but now I have done most of the testing and it is very close now. I have changed lang variable to ee_lang in all instances (to avoid environment variable conflict), made it fully PHP 5 compatible, tested with Zend Accelerator and so on which are basic stuff that needed lots of work.

devenh
3rd of October 2004 (Sun), 10:42
Yes, your site is fast. But you have only 648 photos online. I have 12K photos and EE really bogs down (even after optimization).

Deven

Pekka
3rd of October 2004 (Sun), 10:51
Yes, your site is fast. But you have only 648 photos online. I have 12K photos and EE really bogs down (even after optimization).

Deven

Hi Deven,

Number of photos does now really slow EE down, simply because it fetches only data needed per page, not everything everytime. Only thing number of photos will affect is MySQL server's sorting speed and that should now be significant either, something like 100ms (milliseconds) more per page (or less depending on sorting). MySQL has cache's for sorting and many other things so increasing those will definitely help. Of course if MySQL runs out or RAM or PHP runs out of RAM and CPU is slow and there is lots of other activity on that server can slow things down a lot.

I'd be interested to see your gallery, or have an SQL dump of it to check it out. I could install it on my new (yet hidden) server in protected EE dir for you and we can see if there is indeed any problem in speed. PM me info of your input folder if you'd like me to check it out.

kd6lor
3rd of October 2004 (Sun), 13:28
Yes, your site is fast. But you have only 648 photos online. I have 12K photos and EE really bogs down (even after optimization).

Deven


WOW, 12K photos!!! I have actually been thinking I had too many online. Not because of speed or size, but because I have a dozen or so killer images that no-one will find in the mess.

I have a "gallery" but am thinking of another site for a "portfolio" where I have only a dozen or so images.

Would love to browse your site Devin - care to share the URL?

Paul

Pekka
4th of October 2004 (Mon), 14:41
This post continues in http://photography-on-the.net/forum/showthread.php?t=44375