473,385 Members | 1,769 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

hello I was wondering about mysql performance

Right now I am in a VPS server, mysql constantly will run at 18% usage and slows the site down.

I was wondering what you guys think about a

INTEL P4 3.0GHz HT
1024MB DDR RAM
120GB 7200RPM Hard Drive
1500GB Bandwidth
CentOS Linux Operating System
100Mbps Port + 10 IP's (20 Max)


The site I run is php that constantly gets information and edits information with EVERY page that is ran, right now whenever I get 10 people online flying through the pages it lags horribly. So I was hoping a dedicated server would fix this. I cannot afford a processor much better than this with these specs.

Do you think it would be an improvement? This is a 'web' based game site that heavily relies on the database to get information and change information. Every 10 minutes a php script is ran that adds 'turns' to currently 150 users whether they are online or not. I don't think I can optimize my database much since the information changes virtually every click of the page. But if you think I could optimize it then say what you think, I have never optimized a database before.

I basically want to be able to support 100 pages of php code per second or close to that.
Jun 3 '07 #1
1 1099
pbmods
5,821 Expert 4TB
Start with these because they're free:
  • Make sure your queries are optimized. Make good use of the LIMIT clause if you know how many results you're supposed to return.
  • Make sure your tables are properly indexed.
  • Check your slow_query log and EXPLAIN it.
  • Set up a periodic script or MySQL event that runs an OPTIMIZE TABLE query on each of your tables. This is especially important if you have MyISAM tables, and you delete a lot of data on a regular basis.

The goal is to get MySQL to search as few rows as possible before returning results. If you have an unindexed table with 6000 rows, MySQL has to search every single one of those 6000 rows before returning a result (unless you use a LIMIT clause). On the other hand, if you index that table by whatever field you're searching, MySQL only has to search ONE row per result.

The downside to indexes is that they use a LOT of hard drive space.
Jun 4 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

13
by: jamie howard | last post by:
Hello there - we have a fairly busy server and we just started to have problems with PHP sessions failing. We've never had this problem before and to be honist, out server traffic is lower than it...
5
by: sandy | last post by:
Hi All, I am a newbie to MySQL and Python. At the first place, I would like to know what are the general performance issues (if any) of using MySQL with Python. By performance, I wanted to...
8
by: wlcna | last post by:
mysql v4.0.16: I had been using mysql with innodb and thought that was fine, until i used it for something requiring a few - perhaps slightly involved - joins, and have now seen the performance...
0
by: Forecast | last post by:
I am using the MySQL++, MySQL 4 in MS Visual C++ 6.0. When I try to compile the program, warning occurs (see below). Besides, the program have runtime error as follows: "The procedure entry point...
2
by: Shashikant Kore | last post by:
Hi, I am using MySQL for a table which will have 100M+ records, avg length of records being 130 bytes. When the number of records reach approx. 25M (and the file size close to 4GB), the rate of...
57
by: Bing Wu | last post by:
Hi all, I am running a database containing large datasets: frames: 20 thousand rows, coordinates: 170 million row. The database has been implemented with: IBM DB2 v8.1
39
by: Mairhtin O'Feannag | last post by:
Hello, I have a client (customer) who asked the question : "Why would I buy and use UDB, when MySql is free?" I had to say I was stunned. I have no experience with MySql, so I was left sort...
1
by: Good Man | last post by:
Hi there I've noticed some very weird things happening with my current MySQL setup on my XP Laptop, a development machine. For a while, I have been trying to get the MySQL cache to work....
0
Coldfire
by: Coldfire | last post by:
Since i cannot show the differences in a two-column like table. I am first putting MS SQL Server 2005 and then MySQL 5.x. MS SQL Server 2005 Brief Overview - SQL Server is a full-fledged...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.