-
Server Question
My server has recently been getting more and more hits and I have noticed that there is maybe one or two times a day that it gets heavily loaded and shoots me an email telling me so. I'm not sure how to trouble shoot this. Are my scripts too complex for the amount of users I am getting and could that be overloading my CPU? For those cobalt RaQ users, when I go to the site administrator under active monitor the CPU is in red to help you understand whats going on. Any feedback will help, thanks.
-
Hi,
Whats the server specs?
-
http://store.sun.com/catalog/doc/Bro...html?cid=60310
Its the extra large one. I dont think I got many more bells and whistles, but I might have. But its basically that configuration.
-
Well, the specs are good enough. How many users are you getting when it causes problems?
-
I'm not sure, I have counters set up when people enter our members section, not the main page... and in a span of 15 minutes we only get about 20-25 people browsing around.
-
Hmmm, I think I know what it is. I used the top command and watched as the people cobbled up like 18% of the CPU with calls to the mysql database. I investigated further to find that one of my tables is around 60,000 records.
Now, I read about adding indexes to your tables can make them more effecient, but I'm not quite sure how to do it/how it works. Can anybody help me out?
-
You need to look at your SQL scripts to see what fields you do the most searching and sorting on, and put indexes on those. Does MySQL automatically index primary keys like MS SQL does?
-
yeah I did that when I set up the tables but the foreign keys aren't indexed. I guess I could look into indexing the foreign keys