Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

help! too much traffic for oscommerce to handel?


Recommended Posts

Hi,

 

I store(www.samszone.com) loads really slow recently with 6000 visitor and 40000 pages views a day. I talked to my host and they told me the codes needs to be cleared because each request on my home pages and categoire pages opens a lot of connections to mysql db.

 

anybody has the samiliar traffic? you guy don't have samiliar problem?

 

HELP!

Link to comment
Share on other sites

I checked your site and it loaded fairly quick for me. Nothing that would cause me to go away due to waits too long. I think one problem is tha fact that you have the whole thing overloaded with images. Even though they are 150X80 you have over 30 images per page. As for hits, remember that 4000 hits a day only means that every time you open a page and say it has 30 images, that counts for 30 hits.

 

Unique visits is what you look for, that tells the story of success. Like you site though and think if you downsized the amount of imagery you have you may see a performance issue increase. Try this forum post for some more insight on loading times.

 

http://www.oscommerce.com/forums/index.php?showtopic=30802

Always remember, we need patience, guidance and most of all understanding.

 

My Contributions

Link to comment
Share on other sites

I have 6000 unique visitors, 40,000 page views, and 1,000,000 hits. My host told me I have two problems

 

1. since those pictures were pulled from database, each request on my home page and category pages makes 30 connections to mySQL. that's no good.

 

2. for some reason, when one visitor move from one page to another, a new http session is created instead of stay with the old one. so a visitor keeps creating new sessions which makes the server overloaded.

 

Any body have any solution?

Link to comment
Share on other sites

You have a really nice site, but in order to have it you must expect to pay the penalty. It took just on a minute for the home page to download on my ADSL connection here in the land of OZ where most things are slow anyway. My only suggestion would be to have an interesting but fast loading front page with a minimum of graphics (one or two pics and none of the stuff on the lower left.) rather that trying to sell everything up front. People interested in your products will delve deeper.

 

It's a pity to have to compromise, but your home page would be very slow loading on a phone connection. Forty plus images on a single page is really a lot of work for any busy server.

Link to comment
Share on other sites

Peter, right now I set it to false, should I set it to true of false? I have a dedicated server and have around 10 sites, but those are with very little traffic.

 

Why do you say those images are not pulled from the db? at least their path are queried from db.

 

here is what my host say:

 

This page needs to be recoded. This server is querying the mysql database for every image on every page, this is overloading mysql. The html code on the main page is also creating 37+ connections per user accessing the site, a new session is being created for every image clicked on.

Link to comment
Share on other sites

Yes, I've heard some pretty incredible statements about oscommerce disc reads and the figures you quote don't surprise me at all. Not only disc reads but memory consumption also. Regardless of the arguments put up here however, the solution is in your hands. Less or smaller photos means less code. That equates to less disc reads and an overall improvement ragardless of how small that may be. The alternative is another shopping cart with less code, which of course equates to less features. I thought your site loaded fast enough considering the massive number of pictures you have on your home page. Therefore I thnk your site design is the major problem, not the server or OSC.

Link to comment
Share on other sites

Loading time results for: http://www.samszone.com/

 

Loading test content results

Number of graphics/scripts: 85

Total graphics size: 304585 bytes

Total HTML size: 53133 bytes

Total page size: 357718 bytes

Load time by modem speed

Modem speed: Download time:

14.4k  216.27 seconds

28.8k 116.86 seconds

56k 68.11 seconds

ISDN (128k) 39.83 seconds

T1 (1.44 MB) 19.52 seconds

 

Warning!: Your loading time is much too high! Your chances of indexing in major search engines is slim and you will find very few viewers willing to wait that long for any web page to load!... You must reduce the size of your page! 

 

The_Bear

Link to comment
Share on other sites

my opinion is you need to select another host who knows what they are doing. i have numerous sites and customers, some wiith a whole lot more than what you have. one of the databases is over 17 million records, and has no problem.

 

it is not osCommerce which needs to be recoded but the way you put your site together. here is a more detailed report, along The Bear's response to you.

 

You have a bit of programming to do, and should move to a host who really knows things. I do not think the people at the planet are skilled at understanding things, they are there for just making sure your site is up. ask them what their 'pipe size' is, and where you can go to verify that. if they cant do that, well . .

 

anyway here is your report, you have work to do

 

Web Page Speed Report

 

URL: www.samszone.com

Title: Electric Scooters,Gas Scooters,Scooter Accessories,RC Car,RC Truck,RC Plane,RC helicopters,RC Nitro Car,RC Gas Car

Date: Report run on Fri May 28 07:53:24 EDT 2004

 

Diagnosis

Global Statistics

Total HTTP Requests: 56

Total Size: 335483 bytes

 

Object Size Totals

Object type Size (bytes)

HTML: 8208

Images: 300033

java script: 0

CSS: 27242

Multimedia: 0

Other: 0

 

External Objects

External Object QTY

Total Images: 54

Total CSS imports: 1

 

Download Times*

Connection Rate Download Time

14.4K 271.22 seconds

28.8K 141.21 seconds

33.6K 122.64 seconds

56K 78.06 seconds

ISDN 128K 31.68 seconds

T1 1.44Mbps 12.98 seconds

 

*Note that these download times are based on the full connection rate for ISDN and T1 connections. Modem connections (56Kbps or less) are corrected by a packet loss factor of 0.7. All download times include delays due to round-trip latency with an average of 0.2 seconds per object. With 56 total objects for this page, that computes to a total lag time due to latency of 11.2 seconds. Note also that this download time calculation does not take into account delays due to XHTML parsing and rendering.

 

Page Objects

QTY SIZE# TYPE URL

1 77181 IMG http://www.samszone.com/images/pc_banner5_28.gif

1 27242 CSS http://www.samszone.com/stylesheet.css

1 14361 IMG http://www.samszone.com/images/49cc_chopper_banner.gif

1 14139 IMG http://www.samszone.com/images/helicopter_banner.gif

1 10991 IMG http://www.samszone.com/images/300et_banner.gif

1 8532 IMG http://www.samszone.com/images/newstar_fs609_01_ss.gif

1 8431 IMG http://www.samszone.com/images/500W_Utilit...ooter_01_ss.gif

1 8208 HTML http://www.samszone.com/

1 7976 IMG http://www.samszone.com/images/scooter_v104_1_2.gif

1 7928 IMG http://www.samszone.com/images/rc_gas02_01_ss.gif

2 7880 IMG http://www.samszone.com/images/250_E-015_D...c_Scooter_s.gif

2 7614 IMG http://www.samszone.com/images/500w_mustang_01_ss.gif

1 7502 IMG http://www.samszone.com/images/valuegroup_..._bike_01_ss.gif

1 7376 IMG http://www.samszone.com/images/43CC_G049ET...ree_elmet_s.gif

1 7221 IMG http://www.samszone.com/images/g049_with_s...et_yellow-1.gif

2 7021 IMG http://www.samszone.com/images/s461_01_ss.gif

1 6943 IMG http://www.samszone.com/images/scooter/ele...er_vs03_1_2.gif

1 6795 IMG http://www.samszone.com/images/300_ele_yellow_01.gif

1 6387 IMG http://www.samszone.com/images/tornado_43c...ooter_01_ss.gif

1 5641 IMG http://www.samszone.com/images/logo.gif

1 5400 IMG http://www.samszone.com/images/scooter/ele...er_vs02_1_2.gif

1 5276 IMG http://www.samszone.com/images/rc_air32_01_ss.gif

1 5065 IMG http://www.samszone.com/images/infobox/secure_site.gif

1 4875 IMG http://www.samszone.com/images/rc_gas06_01_ss.gif

1 4873 IMG http://www.samszone.com/images/infobox/wanted.gif

1 4776 IMG http://www.samszone.com/images/rc_air38_01_ss.gif

1 4770 IMG http://www.samszone.com/images/rc_heli01_01_ss.gif

1 4451 IMG http://www.samszone.com/images/infobox/installation.gif

1 4192 IMG http://www.samszone.com/images/infobox/office_hours.gif

1 3889 IMG http://www.samszone.com/images/rc_air54_01_ss.gif

1 3854 IMG http://www.samszone.com/images/scooter_tri5_01_ss.gif

1 3475 IMG http://www.samszone.com/images/infobox/maintenance.gif

1 3305 IMG http://www.samszone.com/images/order_line.gif

1 3190 IMG http://www.samszone.com/images/infobox/goverment.gif

1 2985 IMG http://www.samszone.com/images/infobox/faq.gif

1 2984 IMG http://www.samszone.com/images/infobox/testimonials.gif

1 2406 IMG http://www.samszone.com/images/bizrate/76258_medal.gif

1 1787 IMG http://www.samszone.com/images/infobox/join_affiliate.gif

1 959 IMG http://www.samszone.com/images/icons/logo3v.gif

2 943 IMG http://www.samszone.com/images/infobox/corner_right2.gif

2 853 IMG http://www.samszone.com/images/infobox/corner_left2.gif

1 786 IMG http://www.samszone.com/images/infobox/cor...right_left2.gif

5 685 IMG http://www.samszone.com/images/tabs/tab_left.gif

5 667 IMG http://www.samszone.com/images/tabs/tab_right.gif

1 661 IMG http://www.samszone.com/images/icons/icon_mastercard.gif

1 519 IMG http://www.samszone.com/images/icons/icon_echeck.gif

1 471 IMG http://www.samszone.com/images/icons/icon_discover.gif

1 409 IMG http://www.samszone.com/images/icons/icon_amex.gif

1 402 IMG http://www.samszone.com/images/icons/icon_visa.gif

2 334 IMG http://www.samszone.com/images/infobox/corner_left.gif

5 302 IMG http://www.samszone.com/images/tabs/tab_middle.gif

1 219 IMG http://www.samszone.com/images/infobox/corner_left3.gif

1 127 IMG http://www.samszone.com/images/stars_5.gif

2 112 IMG http://www.samszone.com/images/infobox/corner_right.gif

3 69 IMG http://www.samszone.com/images/infobox/arrow_right.gif

13 43 IMG http://www.samszone.com/images/pixel_trans.gif

56^ 335483* Total (^unique objects)

 

# This site is using HTTP compression, otherwise called content encoding using gzip. The sizes reported here are for compressed content sent from the server to the client.

 

* CSS alternate stylesheets may be referenced in the HTML but are not actually downloaded until they are needed and are therefore not included in the total page size.

 

Analysis and Recommendations

TOTAL_OBJECTS - Warning! The total number of objects on this page is 56 - consider reducing this to a more reasonable number. Combine, refine, and optimize your external objects. Replace graphic rollovers with CSS rollovers to speed display and minimize HTTP requests.

TOTAL_IMAGES - Warning! The total number of images on this page is 54, consider reducing this to a more reasonable number. Combine, refine, and optimize your graphics. Replace graphic rollovers with CSS rollovers to speed display and minimize HTTP requests.

TOTAL_CSS - The total number of external CSS files on this page is 1. Because external CSS files must be in the HEAD of your HTML document, they must load first before any BODY content displays. Although they are cached, CSS files slow down the initial display of your page.

TOTAL_SIZE - Warning! The total size of this page is 335483 bytes, which will load in 78.06 seconds on a 56Kbps modem. Consider reducing total page size to less than 30K to achieve sub eight second response times on 56K connections. Pages over 100K exceed most attention thresholds at 56Kbps, even with feedback. Consider contacting us about our optimization services.

HTML_SIZE - The total size of this HTML file is 8208 bytes, which less than 20K. Assuming that you specify the HEIGHT and WIDTH of your images, this size allows your page to display content in well under 8 seconds, the average time users are willing to wait for a page to display without feedback.

IMAGES_SIZE - Warning! The total size of your images is 300033 bytes, which is over 30K. Consider optimizing your images for size, combining them, and replacing graphic rollovers with CSS.

CSS_SIZE - Warning! The total size of your external CSS is 27242 bytes, which is over 8K. Consider optimizing your CSS for size by eliminating whitespace, using shorthand notation, and combining multiple CSS files where appropriate.

Link to comment
Share on other sites

Thanks all!

 

Questions:

1. should I turn the persistant connections on or off?

2. anybody really understands what these words mean?

 

"This page needs to be recoded. This server is querying the mysql database for every image on every page, this is overloading mysql. The html code on the main page is also creating 37+ connections per user accessing the site, a new session is being created for every image clicked on."

 

John, then which host would you recommend? or any expert would you recommend? I would like to hire some real expert to take care of my issue.

 

Kevin

Link to comment
Share on other sites

Persistent connections should be on. That way OSC opens a few MySQL connections, and then re-uses these connections. Very fast, very stable, etc...

 

Other things to look into:

 

Enabling caching.. it is still marked as experimental, and I have not played with it, so can't speak to that.

 

Make sure that your image directories send headers that allow your clients to cache the images, and make sure that you have a couple of hours on the expire time. Look this up at httpd.apache.org.

 

Check into indexing on MySQL, this can make things much faster if the DB is bogging you down.

Link to comment
Share on other sites

Persistent connections is a concept, which is designed to improve performance for some application. Instead of connection being established for each operation, it is opened once and kept in pool for the applications lifetime.

 

Persistent connections concept allows elimination of several types of overheads, e.g. authentication is performed only once, and so extra network traffic is saved. Some internal structures have to be allocated to handle extra connection. Finally there could be some connection level caches, which need to be filled up for proper performance.

 

MySQL is tuned to keep all of these overheads low. Authentication in MySQL is rather fast, which takes only one roundtrip and small amount of traffic. The slowest operation involved is connection creation. Creation of the OS level thread is eliminated with thread cache. Freed threads are not freed to OS but kept in the pool to be reused by new connections. Most of the caches in MySQL are kept global. Even tables opened by connection are kept in the table cache to be recycled. As MySQL has fast connections handles, in most cases performance benefit of using persistent connection is low.

 

Are there any drawbacks of persistent connections?

Unfortunately there are. At first each connections takes up resources. This includes MySQL internal resources (memory, table cache elements, connections) as well as OS level resources - threads, open files and sockets. Some operating systems are quite OK with this, while others may show performance degradation. MySQL resources are often more important. By having the same amount of memory that would be used for persistent connections, you usually can configure MySQL to use larger buffers, which often gives extra performance. Will this outweigh the benefit from persistent connections? It completely depends on the application.

 

Persistent connections can also lead you to the trouble if you're not using them carefully enough. Some issues described here are handled automatically by good persistent connection support, while others are not. If you've started transaction but did not complete it, the result could be unpredictable - based on what next connection user will do first commit or rollback transaction. Exactly the same issue happens with locked tables. They could be locked stale leading to various issues. Moreover other thread specific settings are left - connection specific variables (sort_buffer,record_buffer...), server level variables (@my_variable), state dependend functions found_rows(), last_insert_id() etc.

 

If you're planning to use persistent connections and are using features similar to the ones listed above, you should check if your persistent connections support library handles these issues and if it does not, you need to fix them manually.

 

Due to the nature of persistent connections, biggest benefit by using them can be achieved over slow network connections and with a few quick queries per connection. If you have complex queries, which take long time to execute or more than 3-5 queries per connection, persistent connections will give you almost no benefit.

 

Conclusion: Instead of blindly enabling persistent connections in MySQL you may wish to benchmark your application to see if persistent connections really give you the performance benefit, and if it is large enough to justify for the limitations introduced by them.

Link to comment
Share on other sites

Hey,

 

when I went to your site it loaded ripping fast, and I am only on DSL,

 

site look nice,

 

how did you go about making the left side nav bar? I can figure out how you spaced the catagorys out with the cool lines and all,

 

care to share?

 

digi

*Outlined in chalk everone looks the same*

 

Currently useing OSC 2.2 MS1

running on Apache/1.3.27 (Unix) (Red-Hat/Linux) mod_jk/1.2.0 mod_perl/1.26 PHP/4.3.3 FrontPage/5.0.2 mod_ssl/2.8.12 OpenSSL/0.9.6b

Link to comment
Share on other sites

  • 2 weeks later...

you could try the 'faster page loads, less db queries' contrib, I have installed it and it does wonders for my site.

 

Jud Stephenson

Link to comment
Share on other sites

First of all, I would suggest moving to a more industrial strength hosting provider, if you are doing a lot of business, then you should be able to cover the extra charges.

 

Your connection can't be all that slow if you are having that many customers unless you have something that just can't be found anywhere else.

 

The tech support thinks the images are coming from the DB, but what is really happening is the price and the text under the image is coming from the DB which should match, number-wise, the number of images. Also, the What's New does a query to get a product id, but NO images are coming from the database.

 

Improving your images, possibly reducing the over all size may help but it may not be enough to noticable. You might want to ligthen up on the graphics on the home page so you don't turn people away. Your site loaded fine for me, I didn't even notice any slowness at all.

 

Joey

Link to comment
Share on other sites

after troubleshooting the system, we made some minor modifications to the server configuration settings. the site is on a dedicated dual P4 system, so it not being on an 'industrial' strength is a moot point. there are a few contributions which also jam up the database, which others may want to look into. The affiliate programs, if there are no referring urls, still stores the record, which is useless, as there is no affiliate to pay. the user tracking was not getting purged properly resulting in numerous records.

also, the previous 'webmaster' did not monitor the server access and error logs, and there was an error being generated every second round the clock and has been for quite some time. that error is now fixed.

the load average would wander from 3.00 to over 100 which absolutely kills the server.

now, with all the traffic, the load average of the system stays pretty much below 1.00.

the tech support personnel have been straightened out, the first level wannabes just do not know what they are talking about.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...