SCIENTIFIC-LINUX-USERS Archives

October 2011

SCIENTIFIC-LINUX-USERS@LISTSERV.FNAL.GOV

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Phong Nguyen <[log in to unmask]>
Reply To:
Phong Nguyen <[log in to unmask]>
Date:
Fri, 28 Oct 2011 19:57:11 -0500
Content-Type:
text/plain
Parts/Attachments:
text/plain (44 lines)
Do be careful about caching mechanisms - doing cache invalidation can be tricky (as is determining when you need to do so). That said, using it can make your life much easier. 

On 28 Oct 2011, at 1627, Christopher Tooley wrote:

> Apologies, forgot to post to the list :P
> 
> For optimisation: 
> I've found that going over the SQL queries and attempting to pare them down a bit helps a lot. Use "EXPLAIN" and become familiar with it's syntax, it will tell you how it's doing the queries and you can then optimize. (for instance, there may be JOIN clause that makes MySQL look through all rows instead of an index or something like that)
> 
> If you find that it's doing a lookup on a column frequently, try giving that an index.
> 
> Also, depending upon what sort of queries you are doing, you may find better performance by switching the backend engine of the specific table.
> 
> I would also recommend checking out memcached, especially if you are only reading information frequently, and you've got a lot of memory on your server - it will cache more common results in memory.
> 
> I'm sure there are some other things I am missing, but I've found that these are the better options. (especially revisiting your heavy queries)
> 
> As for replication, I've always left that to the sysadmins when I was a developer. :P
> 
> -Chris
> 
> 
> On 2011-10-28, at 12:46 PM, Phong Nguyen wrote:
> 
>> There's the basic hardware options - more spindles (in RAID-10) or supercapacitor-backed SSDs, etc. Check your queries and see if you can optimize them to return less data. 
>> 
>> There's also Percona's fork of MySQL, which is reputed to be better-optimized and tuned (and is available freely on RHEL and Debian type systems complete with repositories, http://www.percona.com/software/percona-server/downloads/ )
>> 
>> Replication documentation is available here: http://dev.mysql.com/doc/refman/5.5/en/replication-howto.html
>> 
>> On 28 Oct 2011, at 1335, Pablo Cavero wrote:
>> 
>>> Hi,
>>> 
>>> Some one have any tips to have a better performance on MySQL, and a procedure to make a Master and Slave Replication MySQL system.
>>> 
>>> Thnks a lot,
>>> 
>>> 
>>> -- 
>>> Pablo Cavero
>>> System Engineer
>>> +569 8920 9509

ATOM RSS1 RSS2