Bravo List
Register
Go Back   > Bravo List > Source Code > Trackers > Torrent Trader
Reply
  #1  
Old 08-01-18, 16:54
Tumo's Avatar
Tumo Tumo is offline
Member
 
Join Date: Jan 2018
Posts: 2
Unhappy 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
Reply With Quote
  #2  
Old 08-01-18, 17:48
l3on's Avatar
l3on l3on is offline
Coder
 
Join Date: Jul 2012
Posts: 117
Default
Please provide more information like witch mods you use and how many members?
Reply With Quote
The Following User Says Thank You to l3on For This Useful Post:
Tumo (08-01-18)
  #3  
Old 08-01-18, 18:15
Tumo's Avatar
Tumo Tumo is offline
Member
 
Join Date: Jan 2018
Posts: 2
Default
Quote:
Originally Posted by l3on View Post
Please provide more information like witch mods you use and how many members?
DM sent :)
Reply With Quote
  #4  
Old 08-01-18, 18:19
l3on's Avatar
l3on l3on is offline
Coder
 
Join Date: Jul 2012
Posts: 117
Default
I've read your message again this provide nothing we need to know each mod you have install etc
And your server specs.
Reply With Quote
  #5  
Old 08-01-18, 19:19
DND's Avatar
DND DND is online now
Support
 
Join Date: Dec 2008
Posts: 1,037
Default
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:

  1. Server/VPS (Debian,CentOS,Ubuntu,Fedora, FreeBSD) Optimization and ... + Modules
  2. Webserver Windows/Linux (Apache/Lighttpd/Nginx/Mysql/PhpMyAdmin/SSL) Optimization and ... + Modules
  3. Seedbox Windows/Linux (uTorrent,rTorrent,libTorrent,ruTorrent) + Modules
  4. TBDev Support
  5. Gazelle Support Install
  6. TSSE Install Support
Reply With Quote
  #6  
Old 08-01-18, 19:49
darkalchemy's Avatar
darkalchemy darkalchemy is offline
VIP
 
Join Date: Dec 2017
United States
Posts: 33
Default
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.
__________________
I do custom coding, source installs, mods, server setup and/or config, etc. Feel free to pitch me your needs and your offer.
Reply With Quote
The Following 2 Users Say Thank You to darkalchemy For This Useful Post:
HDVinnie (09-01-18), papad (08-01-18)
  #7  
Old 09-01-18, 05:45
HDVinnie's Avatar
HDVinnie HDVinnie is offline
BluCrew
 
Join Date: Dec 2014
P2P
Posts: 95
Default
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.
Reply With Quote
  #8  
Old 11-01-18, 03:30
ArcticWolf's Avatar
ArcticWolf ArcticWolf is offline
Senior Member
 
Join Date: Oct 2008
Posts: 42
Default
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,
Reply With Quote
  #9  
Old 13-01-18, 11:54
LeeHowarth's Avatar
LeeHowarth LeeHowarth is offline
TT
 
Join Date: Nov 2008
Posts: 95
Default
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.
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



All times are GMT +2. The time now is 08:13. vBulletin skin by ForumMonkeys. Powered by vBulletin® Version 3.8.11 Beta 3
Copyright ©2000 - 2018, vBulletin Solutions Inc.