MyBB Community Forums

Full Version: 16-30 seconds for a post to post
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6
Do you also notice that when your server load is higher, thats when you get longer load times? In an ssh screen, run 'top' and see what processes are bogging down the server. Its a VPS, so its possible that your host has overloaded the server with too many servers or with a site that is a resource hog. The fact that when you complain to your host and they "fix" it which only lasts a short time should tell you that something's fishy with the host's setup.
First thing this morning I went to the site and it took a long time to even connect. I went to http://downforeveryoneorjustme.com/ and it said it wasn't just me. Once it finally connected it loaded just fine. There were only about 8 members and 16 guests on too.

Below is what I received after running the "top" command.

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
30666 nobody 16 0 43700 15m 5732 S 1.3 3.0 0:00.26 httpd
30672 root 15 0 2288 1032 816 R 0.3 0.2 0:00.01 top
1 root 18 0 2156 668 576 S 0.0 0.1 12:05.26 init
7362 root 18 0 7188 1064 660 S 0.0 0.2 0:00.00 sshd
7483 root 15 0 6368 372 272 S 0.0 0.1 0:01.23 pure-ftpd
7485 root 16 0 6104 80 44 S 0.0 0.0 0:01.75 pure-authd
7683 mailnull 15 0 10352 2660 2168 S 0.0 0.5 0:33.60 exim
7688 mailnull 15 0 10356 2648 2156 S 0.0 0.5 0:00.76 exim
8107 root 15 0 1824 520 412 S 0.0 0.1 0:00.03 portsentry
11836 root 15 0 5696 3824 1212 S 0.0 0.7 10:56.27 queueprocd
11839 root 15 0 7896 5160 1744 S 0.0 1.0 4:21.98 tailwatchd
11849 root 18 0 4180 2224 1080 S 0.0 0.4 0:00.88 cphulkd
11868 root 18 0 14196 7904 1416 S 0.0 1.5 0:00.00 cpdavd
11878 root 33 18 3848 1472 608 S 0.0 0.3 0:00.46 cpanellogd
11909 root 15 0 14796 7732 1272 S 0.0 1.5 0:27.06 cpsrvd-ssl
14290 named 18 0 82540 15m 2076 S 0.0 2.9 5:14.86 named
15552 root 15 0 1724 364 280 S 0.0 0.1 1:29.98 syslogd


My host did a few things yesterday to "optimize" certain things. I thanked them and informed that nothing has changed. They eventually got back to me with the below email.

Hello,

We have analyzed your site with site analyzing tool and got following recommendations.


=======
* TOTAL_HTML - Congratulations, the total number of HTML files on this page (including the main HTML file) is 1 which most browsers can multithread. Minimizing HTTP requests is key for web site optimization. Y
* TOTAL_OBJECTS - Warning! The total number of objects on this page is 31 which by their number will dominate web page delay. Consider reducing this to a more reasonable number. Above 20 objects per page the overhead from dealing with the actual objects (description time and wait time) accounts for more than 80% of whole page latency. See Figure II-3: Relative distribution of latency components showing that object overhead dominates web page latency in Website Optimization Secrets for more details on how object overhead dominates web page latency. Combine, refine, and optimize your external objects. Replace graphic rollovers with CSS rollovers to speed display and minimize HTTP requests. Consider using CSS sprites to help consolidate decorative images. Using CSS techniques such as colored backgrounds, borders, or spacing instead of graphic techniques can reduce HTTP requests. Replace graphic text headers with CSS text headers to further reduce HTTP requests. Finally, consider optimizing parallel downloads by using different hostnames or a CDN to reduce object overhead.
* TOTAL_IMAGES - Warning! The total number of images on this page is 22 , consider reducing this to a more reasonable number. Recommend combining, replacing, and optimizing your graphics. Replace graphic rollover menus with CSS rollover menus to speed display and minimize HTTP requests. Consider using CSS sprites to help consolidate decorative images. Use CSS techniques such as colored backgrounds, borders, or spacing instead of graphic techniques to reduce HTTP requests. Replace graphic text headers with CSS text headers to further reduce HTTP requests. Finally, consider optimizing parallel downloads by using different hostnames to reduce object overhead.
* TOTAL_CSS - Congratulations, 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. Remember to place CSS files in the HEAD and JavaScript files at the end of the BODY to enable progressive display.
* TOTAL_SIZE - Warning! The total size of this page is 757878 bytes, which will load in 157.24 seconds on a 56Kbps modem. Consider reducing total page size to less than 100K to achieve sub 20 second response times on 56K connections. Pages over 100K exceed most attention thresholds at 56Kbps, even with feedback. Consider optimizing your site with Website Optimization Secrets, Speed Up Your Site or contacting us about our optimization services.
* TOTAL_SCRIPT - Warning! The total number of external script files on this page is 7 , consider reducing this to a more reasonable number. Combine, refactor, and minify to optimize your JavaScript files. Ideally you should have one (or even embed scripts for high-traffic pages) on your pages. Consider suturing JavaScript files together at the server to minimize HTTP requests. Placing external JavaScript files at the bottom of your BODY, and CSS files in the HEAD enables progressive display in XHTML web pages.
* HTML_SIZE - Congratulations, the total size of this HTML file is 9050 bytes, which less than 50K. Assuming that you specify the HEIGHT and WIDTH of your images, this size allows your HTML to display content in under 10 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 578537 bytes, which is over 100K. Consider switch graphic formats to achive smaller file sizes (from JPEG to PNG for example). Finally, substitute CSS techniques for graphics techniques to create colored borders, backgrounds, and spacing.
* SCRIPT_SIZE - Warning! The total size of external your scripts is 160108 bytes, which is over 20K. Consider optimizing your JavaScript for size, combining them, and using HTTP compression where appropriate for any scripts placed in the HEAD of your documents. You can substitute CSS menus for JavaScript-based menus to minimize or even eliminate the use of JavaScript.
* CSS_SIZE - Caution. The total size of your external CSS is 10183 bytes, which is above 8K and less than 20K. For external files, ideally keep them less than 1160 bytes to fit within one higher-speed TCP-IP packet (or an approximate multiple thereof). Consider optimizing your CSS and eliminating features to reduce this to a more reasonable size.
* MULTIM_SIZE - Congratulations, the total size of all your external multimedia files is 0 bytes, which is less than 10K.
=======


http://analyze.websiteoptimization.com/wso



Please optimize those with the help of a developer. Also please optimize queries to database "ej8squad_forum".


=======
root@host [~]# mysqladmin proc stat
+-------+------------------+-----------+----------------+---------+------+----------------+-----------------------------------------------------------------------------------------------------+
| Id | User | Host | db | Command | Time | State | Info |
+-------+------------------+-----------+----------------+---------+------+----------------+-----------------------------------------------------------------------------------------------------+
| 13279 | leechprotect | localhost | leechprotect | Sleep | 4458 | | |
| 17357 | *********** | localhost | *********** | Query | 1 | Sorting result | SELECT p.pid FROM mybb_posts p WHERE p.tid='5365' AND p.visible='1' ORDER BY p.dateline LIMIT 0, 10 |
| 17359 | root | localhost | | Query | 0 | | show processlist |
+-------+------------------+-----------+----------------+---------+------+----------------+-----------------------------------------------------------------------------------------------------+
Uptime: 17927 Threads: 3 Questions: 275087 Slow queries: 157 Opens: 551 Flush tables: 1 Open tables: 307 Queries per second avg: 15.345
=======



Let us know if you need further assistance.


I finally got some specific answers from my host as to why it is so slow to post on my forum. It has something to do with high mysql processes, temp table, and table structure. Below is the reply that I received explaining it in more detail. If someone could tell me what I need to do because the reply is a bit over my head.

Thanks,

Jeremy

KnowHost's reply to my support ticket.

The load on the server is a bit high due to the mysql processes. All selects that involve data copying into the temporary table are very resource intensive and can slow down your operations a lot. I would suggest to check database table structures and this select query to make sure that indexes you have in your db tables correspond to the select operation you're trying to run. When select / order by / group by / join operations are performed on tables with incorrect indexes MySQL will be forced to create a new temporary table, copy data there and perform these sorting operations on a temporary table. Such operations might take significant amount of CPU and Disk I/O bandwidth and can dramatically reduce performance of your site(s).

-------------
root@host [~]# mysqladmin proc stat
+--------+------------------+-----------+----------------+---------+------+----------------------+------------------------------------------------------------------------------------------------------+
| Id | User | Host | db | Command | Time | State | Info |
+--------+------------------+-----------+----------------+---------+------+----------------------+------------------------------------------------------------------------------------------------------+
| 525685 | leechprotect | localhost | leechprotect | Sleep | 4312 | | |
| 531355 | *********** | localhost | ********* | Query | 0 | Copying to tmp table | SELECT t.*, p.displaystyle AS threadprefix, (t.totalratings/t.numratings) AS averagerating, r.uid AS |
| 531356 | root | localhost | | Query | 0 | | show processlist |
+--------+------------------+-----------+----------------+---------+------+----------------------+------------------------------------------------------------------------------------------------------+
Uptime: 622665 Threads: 3 Questions: 7888816 Slow queries: 3145 Opens: 875 Flush tables: 1 Open tables: 438 Queries per second avg: 12.669
root@host [~]#
It seems to work fine on other big sites and I doubt they've all manually indexed things.
The query in question is the main query to return the threads for the forumdisplay page.

However, I am not sure why yours is copying to a tmp table but my guess would be that your MySQL setup does not have the memory it needs
What do you suggest that I do to fix this because it is becoming almost unbearable to post anything?
do you have phpMyAdmin? If so, open that and on the left panel, click the phpMyAdmin image at the top. the right side should then show tabs like Database, Status, Variables, etc.

Click the Variables tab and copy/paste that info here
It's not even just posting that's slow, a lot of the site is slow. Even if some things weren't fully indexed, that wouldn't affect the entire site. Loading newreply.php just took 25 seconds for me, there's no way an indexing issue would make that page take 25 seconds to load.
Sure, I can get you that info. I will have to psot the info in a few hours though.
you are not caching your CSS either, the page is calling css.php three times and having to parse that every page view.
Pages: 1 2 3 4 5 6