Quote:
Originally Posted by cobrabm
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!