|
#1
|
|||
|
|||
MySQL databse optimisation in torrenttrader script
Hi for some reason one of my site (which use torrentrader script) has some issue with mysql databse ,mysql usage goes upto 500-800% , I couldnt figure it out what to do to fix/optimize the database
so pls help me thanks in advance |
#2
|
|||
|
|||
Please provide more information like witch mods you use and how many members?
|
The Following User Says Thank You to l3on For This Useful Post: | ||
Tumo (8th January 2018)
|
#3
|
|||
|
|||
DM sent :)
|
#4
|
|||
|
|||
I've read your message again this provide nothing we need to know each mod you have install etc
And your server specs. |
#5
|
|||
|
|||
of course it goes up to 800% if you didnt configured the mysql server properly and if you dont have your sql tables also proper configured
start from here: 1. configure your mysql server. dont expect someone to just give you the right answer because there isnt. each problem depends on the situation
__________________
Need HELP!? I can install:
|
#6
|
|||
|
|||
There is no easy fix.
But, you can start by logging slow queries and then use a tool to analyze it. Find out what queries are bringing the server down. Use tools like mysql tuner to analyze mysql and tweak the config. You should only make one change at a time. One per day is a good rule of thumb. There is much more you can do, such as caching the results, optimize the queries, remove unnecessary joins, etc. These are just a few things I can think of off the top of my head. |
#7
|
||||
|
||||
logging slow queries
This 100%! It could be something as simple as a table with so many records that when to many users access that query at same time it can cause timeouts. |
#8
|
|||
|
|||
Most of the time high cpu usage is wrong or missing indexes.
Best bet is to check the tables in question to make sure has indexes Without knowing your exact query causing the lag its hard to say what your indexes should be. Also I would try changing well used tables or really large tables from MyISAM to InnoDB because InnoDB dont lock the table in slow querys. Ones I would do without looking at the db is users,torrents,files,comments, |
#9
|
|||
|
|||
If you have alot of RAM then use MEMORY storage engine for peers, guests tables, and INNODB for users, torrents.
With abit of traffic your site will become heavilly overloaded, the main problem is the scrape/announce requests. In the past i did some experimental work with adding caching in the announce/scrape and it helped alot. |
Tags |
databse , mysql , optimisation , script , torrenttrader |
|
|