Bravo List

Bravo List (http://www.bvlist.com/index.php)
-   Torrent Trader (http://www.bvlist.com/forumdisplay.php?f=29)
-   -   MySQL databse optimisation in torrenttrader script (http://www.bvlist.com/showthread.php?t=11427)

Tumo 8th January 2018 16:54

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 :sad:

l3on 8th January 2018 17:48

Please provide more information like witch mods you use and how many members?

Tumo 8th January 2018 18:15

Quote:

Originally Posted by l3on (Post 51288)
Please provide more information like witch mods you use and how many members?

DM sent :)

l3on 8th January 2018 18:19

I've read your message again this provide nothing we need to know each mod you have install etc
And your server specs.

DND 8th January 2018 19:19

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

darkalchemy 8th January 2018 19:49

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.

HDVinnie 9th January 2018 05:45

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.

ArcticWolf 11th January 2018 03:30

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,

LeeHowarth 13th January 2018 11:54

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.


All times are GMT +2. The time now is 00:35.

Powered by vBulletin® Version 3.8.11 Beta 3
Copyright ©2000 - 2024, vBulletin Solutions Inc.