Forum Moderators: open
If you scroll down, you would see a list of figures, that indicate when a particular page in the website was hit , and the duration it took to create the page - the page is in php with some data fetched via a mysql db.
The content served is the same to all users, but it's dynamic - depends on the current data in the database.
You would note that there isn't very high concurrency, there are some occasions when 2 requests are coming within a second of each other, and that's when one of the requests takes more time to serve.
I'm ruling out indexes because it's not consistently slow for all requests - only some.
What could be the possible cause of this problem? the page fetch only does selects, and it inserts into a logger table(whose output I presented below) - this logger table has no indexes. Could I be accidentally locking rows for select? Is there a need to change some parallel process/thread related parameters for php/mysql?
The load average and top outputs are pretty normal throughout the day, only, sometimes we see mysql consuming more memory when this happens.
This could be a php issue but I could post this either here or in the php forum; let me know if this is not the right place.
HH:MI:SS, seconds to create the page
15:23:29, 12
15:29:10, 12.55
15:30:12, 1.54
15:32:58, 22.94
15:34:09, 1.15
15:38:11, 70.04
15:39:47, 1.04
15:40:00, 21.72
15:47:57, 32.75
15:47:57, 31.18
15:48:39, 0.48
15:48:44, 6.42
15:50:07, 2.38
15:50:25, 1.24
15:50:56, 0.64
15:51:01, 2.57
15:59:26, 92.03
15:59:26, 40.88
16:09:53, 125.67
16:11:04, 1.17
16:11:49, 2.19
16:11:56, 9.94
16:14:43, 0.86
16:18:40, 0.95
16:19:44, 0.99
16:21:01, 0.38
16:23:02, 4.21
16:25:57, 13.46
16:27:18, 0.21
If you're the only one on the box, then it may be more serious. It looks like something is going on with the database at the same time. With no other users, I would suspect hacking or at least attempts to hack into the box.
Oh, wait, are you doing a SELECT on the same table you're writing to?
Also, the numbers are only good for comparison if each page is actually doing the same select. For example, if one select is returning 100 records and another is returning 1000,000 rows, aples/oranges.
How does one know about the overloading? It's a virtual dedicated server, and moving to a dedicated server would be expensive, wouldn't mind doing that if it really improves things but I need to be sure that's the problem. I could monitor top output or memory usage to find out. Any other way to find out if there's overloading would be appreciated.
Hacking - suspected that, but again, want to be sure our own house is clean first.
Each page does the same select - the same data is served for all requests.
Yes, there are inserts happening to the same table that's being selected from. Does that affect performance?