Bravo List
Register
Go Back   > Bravo List > Source Code > Archived Trackers > Free Torrent Source
Reply
  #1  
Old 2nd January 2010, 01:36
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 2nd January 2010, 04:57
benjaminbih benjaminbih is offline
Senior Member
 
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; 2nd January 2010 at 16:22.
Reply With Quote
  #3  
Old 2nd January 2010, 14:47
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 2nd January 2010, 15:02
benjaminbih benjaminbih is offline
Senior Member
 
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 2nd January 2010, 15:17
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 2nd January 2010, 16:18
benjaminbih benjaminbih is offline
Senior Member
 
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 3rd January 2010, 00:33
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 3rd January 2010, 00:35
benjaminbih benjaminbih is offline
Senior Member
 
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 3rd January 2010, 00:37
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 4th February 2010 23:33
announce.php cauzing high load on hosting servers Syn Template Shares 8 29th June 2009 22:26
high quality designer available Zepp Sell & Buy 1 31st May 2009 12:37
Plaease help Server Load problem!!! dmtr123 Torrent Trader 2 19th October 2008 20:18
[REQ] Server load mod scener Template Shares 1 23rd July 2008 04:54



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