
10-27-2009, 09:13 AM
|
|
Community Liaison
|
|
Join Date: Feb 2006
Location: Istanbul, Turkey
Posts: 3,090
|
|
Server has 7 GBs of free RAM
Current server has 4 GB ram, all buffered by linux.
Code:
total used free shared buffers cached
Mem: 4054 3917 137 0 99 2139
-/+ buffers/cache: 1678 2375
Swap: 4094 0 4094
The buffer has 2375 MB of free ram. However this is a heavy mysql server. I want the empty ram be used by mysql so it becomes faster.
We are currently moving to a 8GB ram server, and the free ram will be around 7 GB if we use the exact same configuration. I want the free ram to be 1 GB at most, why pay for 8 GB ram if I'm going to use a fraction of it?
What optimizations should I attempt?
Notes:
- I know about harddisk I/O bottlenecks, I have two SATA drives in the system, and a SAS drive dedicated to mysql, that's all we can afford currently.
- All mysql databases are for SMF forums, and currently using MyISAM tables. Switching to another storage engine is a possibility, if it won't create problems in restarts and hot backups.
__________________
█ Fraud Record - Stop Fraud Clients, Report Abusive Customers.
█ Combine your efforts to fight misbehaving clients.
█ HarzemDesign - Highest quality, well designed and carefully coded hosting designs. Not cheap though.
█ Large and awesome portfolio, just visit and see!
|

10-27-2009, 10:01 AM
|
|
Newbie
|
|
Join Date: Apr 2009
Location: Kerala, India
Posts: 19
|
|
You can clear the cached RAM by executing the following command as root
========================================
sync; echo 3 > /proc/sys/vm/drop_caches
========================================
|

10-27-2009, 10:08 AM
|
|
Community Liaison
|
|
Join Date: Feb 2006
Location: Istanbul, Turkey
Posts: 3,090
|
|
Great, but that's not what I'm asking at all  Thanks for trying to help though!
__________________
█ Fraud Record - Stop Fraud Clients, Report Abusive Customers.
█ Combine your efforts to fight misbehaving clients.
█ HarzemDesign - Highest quality, well designed and carefully coded hosting designs. Not cheap though.
█ Large and awesome portfolio, just visit and see!
|

10-27-2009, 10:15 AM
|
|
Newbie
|
|
Join Date: Apr 2009
Location: Kerala, India
Posts: 19
|
|
I'm sorry about that. That was the response to another post, got the tabs mixed up.
You can use the MySQL Tuner script for doing this
# wget http://mysqltuner.com/mysqltuner.pl
# chmod +x mysqltuner.pl
# ./mysqltuner.pl
This will let you know which Variables to adjust for optimum performance.
|

10-27-2009, 04:39 PM
|
|
Community Liaison
|
|
Join Date: Feb 2006
Location: Istanbul, Turkey
Posts: 3,090
|
|
Thanks, we are already using it, but it doesn't show us a way to populate the RAM for the best performance.
I was hoping to get a few more opinions from a few more people!
__________________
█ Fraud Record - Stop Fraud Clients, Report Abusive Customers.
█ Combine your efforts to fight misbehaving clients.
█ HarzemDesign - Highest quality, well designed and carefully coded hosting designs. Not cheap though.
█ Large and awesome portfolio, just visit and see!
|

10-27-2009, 05:34 PM
|
|
Always Learning...
|
|
Join Date: Aug 2002
Location: Bharat
Posts: 4,571
|
|
Have you checked, where all the RAM is being used and how much RAM MySql is using?
|

10-27-2009, 05:39 PM
|
|
Community Liaison
|
|
Join Date: Feb 2006
Location: Istanbul, Turkey
Posts: 3,090
|
|
Quote:
Originally Posted by vinsar
Have you checked, where all the RAM is being used and how much RAM MySql is using?
|
Yes, RAM is staying idle, as I posted in my first post. Not sure particularly how much MySQL is using, but I sure like it to increase, so it gets faster.
__________________
█ Fraud Record - Stop Fraud Clients, Report Abusive Customers.
█ Combine your efforts to fight misbehaving clients.
█ HarzemDesign - Highest quality, well designed and carefully coded hosting designs. Not cheap though.
█ Large and awesome portfolio, just visit and see!
|

10-27-2009, 05:56 PM
|
|
Community Liaison 2.0
|
|
Join Date: Feb 2005
Location: Australia
Posts: 5,104
|
|
Are you using the query cache?
__________________
Chris
"Learn from the mistakes of others. You can never live long enough to make them all yourself." - Groucho Marx
|

10-27-2009, 06:02 PM
|
|
Community Liaison
|
|
Join Date: Feb 2006
Location: Istanbul, Turkey
Posts: 3,090
|
|
Quote:
Originally Posted by foobic
Are you using the query cache?
|
Is it an application level or a server-wide setting?
__________________
█ Fraud Record - Stop Fraud Clients, Report Abusive Customers.
█ Combine your efforts to fight misbehaving clients.
█ HarzemDesign - Highest quality, well designed and carefully coded hosting designs. Not cheap though.
█ Large and awesome portfolio, just visit and see!
|

10-27-2009, 06:19 PM
|
|
Community Liaison 2.0
|
|
Join Date: Feb 2005
Location: Australia
Posts: 5,104
|
|
Server-wide. http://dev.mysql.com/doc/refman/5.1/en/query-cache.html
Trying to get it to use all your spare memory would probably be counter-productive, but it's certainly worth giving it something.
__________________
Chris
"Learn from the mistakes of others. You can never live long enough to make them all yourself." - Groucho Marx
|

10-27-2009, 06:20 PM
|
|
Always Learning...
|
|
Join Date: Aug 2002
Location: Bharat
Posts: 4,571
|
|
Your total RAM is 4054, used is 3917 and free is 137 how come the server has 7 GB?
query cache is a MySql setting that you set in my.cnf
Is this a cPanel server
Can you post the /etc/my.cnf content here (remove the client/password section if it is in there)?
|

10-27-2009, 06:58 PM
|
|
Web Hosting Master
|
|
Join Date: Apr 2003
Location: Los Angeles, CA
Posts: 723
|
|
You are already using that RAM for caching, so it's not just sitting there unused. The kernel takes care of caching for you on the block and file system level. The only place where you can cache things on mySQL itself is with the query cache, which works pretty well if your data has lots of repeating reads.
The mySQL tuning primer will tell you if you buffers are sufficiently large (for joins, sorting, etc). but these are used to process a query. Repeated access to the data on the disk itself is cached by the OS, so the more RAM you have for caching the better (you currently use 2.1 GB).
For comparison, my DB server has 16 GB of RAM, of which over 15 GB are just cached data. It handles about 20 million queries a day without breaking a sweat.
__________________
Pings <1 ms, Unlimited Transfer, Lowest Price: http://localhost/
|

10-28-2009, 03:13 AM
|
|
Community Liaison
|
|
Join Date: Feb 2006
Location: Istanbul, Turkey
Posts: 3,090
|
|
Quote:
Originally Posted by vinsar
Your total RAM is 4054, used is 3917 and free is 137 how come the server has 7 GB?
|
As I said in the first post, the new server will have.
I will try query cache and give it a few GBs of ram to use, and let you know the result, thanks 
__________________
█ Fraud Record - Stop Fraud Clients, Report Abusive Customers.
█ Combine your efforts to fight misbehaving clients.
█ HarzemDesign - Highest quality, well designed and carefully coded hosting designs. Not cheap though.
█ Large and awesome portfolio, just visit and see!
|

10-28-2009, 03:21 AM
|
|
Global Solutions Provider
|
|
Join Date: Apr 2009
Posts: 3,150
|
|
Is this a 32bit or 64bit OS?
__________________
█ http://rlshosting.com
█ RLS Hosting | Real, Logical, & Solid.
█ Web Hosting, Master Resellers, Dedicated Servers, & Domain Registration.
█ RVSkins, RVSiteBuilder Professional, & Softaculous Premium Auto Installer
|

10-28-2009, 04:14 AM
|
|
Community Liaison
|
|
Join Date: Feb 2006
Location: Istanbul, Turkey
Posts: 3,090
|
|
__________________
█ Fraud Record - Stop Fraud Clients, Report Abusive Customers.
█ Combine your efforts to fight misbehaving clients.
█ HarzemDesign - Highest quality, well designed and carefully coded hosting designs. Not cheap though.
█ Large and awesome portfolio, just visit and see!
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
| Postbit Selector |
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|
|
| Login: |
|
|
| Advertisement: |
|
|
| Web Hosting News: |
|
|
|