Bravo List
Register
Go Back   > Bravo List > Source Code > Trackers > Free Torrent Source
Reply
  #1  
Old 02-01-10, 01:36
cobrabm's Avatar
cobrabm cobrabm is offline
Senior Member
 
Join Date: Mar 2008
Posts: 18
Default Announce.php high load in mysqld on 1500 peers
Announce.php high load in mysqld on 1500 peers
anyone can help me to use announce from tbdev
Reply With Quote
  #2  
Old 02-01-10, 04:57
benjaminbih's Avatar
benjaminbih benjaminbih is offline
Hobby Coder
 
Join Date: Jul 2008
Bosnia-Herzegovina
Posts: 70
Default
Quote:
Originally Posted by cobrabm View Post
Announce.php high load in mysqld on 1500 peers
anyone can help me to use announce from tbdev
You will have the same problem with tbdev announce.php on a large tracker.

You have to add aditional indexes to your database tables peers, sntached , usergroups and users.
The index of your tables will grow up, but you will earn speed!

Add to user table:

PHP Code:
ALTER  TABLE  `users`  ADD  INDEX  `passkey` (  `passkey`  ); 
Add to snatched table:
PHP Code:
ALTER  TABLE  `snatched`  ADD  INDEX  `torrent_user` (  `torrentid` ,  `userid`  ); 
Add to peers table:
PHP Code:
ALTER  TABLE  `peers`  DROP  INDEX  `torrent_peer_id` ,
 
ADD  INDEX  `torrent_peer_id` (  `torrent` ,  `peer_id` ,  `passkey`  ) ; 
Add to table usergoups:
PHP Code:
ALTER  TABLE  `usergroups`  ADD  INDEX  `hassfreeleech` (  `hasfreeleech`  ); 
This are some examples, you can add more, but be carefull. Large indexes can have too negativ impacts to your serverload.

Dont forget to increase your key buffer size for mysql engine :D

Please tell how helpfull this was!

Last edited by benjaminbih; 02-01-10 at 16:22.
Reply With Quote
  #3  
Old 02-01-10, 14:47
cobrabm's Avatar
cobrabm cobrabm is offline
Senior Member
 
Join Date: Mar 2008
Posts: 18
Default re
this commands helps me now mysqld stay on 20-60% not in 100-150 %

how much to insrase key buffer size?
Reply With Quote
  #4  
Old 02-01-10, 15:02
benjaminbih's Avatar
benjaminbih benjaminbih is offline
Hobby Coder
 
Join Date: Jul 2008
Bosnia-Herzegovina
Posts: 70
Default
Go to phpmyadmin and look how big all your indexes together are.
Let us say your indexes are 100MB big, then set it to +50% = 150MB and look from time to time if you need to increase key buffer again.

You can add more indexes if you need. You have to look over each mysql_query($string) that is often loaded.
And if the query search on a not indexed column then add index to it.

Example1:
PHP Code:
SELECT FROM users WHERE ip $ip 
if the column is not indexed then add index to it.

Example2:
PHP Code:
SELECT FROM users WHERE class >= $class AND donor yes 
in these case you have to add an index over the columns "class" AND "donor"

Or if the where statment search over 3 or 4 columns you have to add an index over 3 or 4 columns.
You have to try which are the best indexes for you.
Reply With Quote
  #5  
Old 02-01-10, 15:17
cobrabm's Avatar
cobrabm cobrabm is offline
Senior Member
 
Join Date: Mar 2008
Posts: 18
Default
how to remove anti-cheat mod this high load
Reply With Quote
  #6  
Old 02-01-10, 16:18
benjaminbih's Avatar
benjaminbih benjaminbih is offline
Hobby Coder
 
Join Date: Jul 2008
Bosnia-Herzegovina
Posts: 70
Default
Before you try to remove the mod, try this change to DB:

PHP Code:
ALTER TABLE `anti_cheatDROP INDEX `usertorrent` ,
ADD INDEX `usertorrent` ( `user_id` , `torrent_id` , `uploaded` , `downloaded` ) ; 
Reply With Quote
  #7  
Old 03-01-10, 00:33
cobrabm's Avatar
cobrabm cobrabm is offline
Senior Member
 
Join Date: Mar 2008
Posts: 18
Default thx
Is verry helpfully for me thx much

If you know something ticks tell me

Thanks a lot
Reply With Quote
  #8  
Old 03-01-10, 00:35
benjaminbih's Avatar
benjaminbih benjaminbih is offline
Hobby Coder
 
Join Date: Jul 2008
Bosnia-Herzegovina
Posts: 70
Default
tell us please how much your server load decrease in this case?
Reply With Quote
  #9  
Old 03-01-10, 00:37
cobrabm's Avatar
cobrabm cobrabm is offline
Senior Member
 
Join Date: Mar 2008
Posts: 18
Default
25836 mysql 20 0 234m 49m 6220 S 14 2.5 7:33.31 mysqld
and not jump after 50 %

Bump: now jumping cpu after 100% please help to full indexing the database

Bump: any one can say me somme indexing triks ?
Reply With Quote
Reply

Tags
1500 , announcephp , high , load , mysqld , peers

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
warning in server load toontigger Torrent Strike 3 04-02-10 23:33
announce.php cauzing high load on hosting servers Syn Template Shares 8 29-06-09 22:26
high quality designer available Zepp Sell & Buy 1 31-05-09 12:37
Plaease help Server Load problem!!! dmtr123 Torrent Trader 2 19-10-08 20:18
[REQ] Server load mod scener Template Shares 1 23-07-08 04:54



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