Opened 11 years ago

Closed 11 years ago

Last modified 6 years ago

#2379 closed patch (Fixed)

Move cleanup of prev_status from torrent.py to torrentmanager.py

Reported by: Bro Owned by:
Priority: minor Milestone: 2.0.0
Component: Core Version: develop
Keywords: Cc:

Description

Each torrent instance has a LoopingCall that cleans up the prev_status dictionary regularly. With a lot of torrents the number of LoopingCalls starts to generate a lot of CPU usage.

This patch replaces the LoopingCalls for each torrent with one LoopingCall in torrentmanager.py. I tested on my desktop copmuter with the daemon running idle (not downloading/seeding or with clients connected).

With 5000 torrents the CPU usage was reduced from 26-40% to 3-5%. With 10000 it was reduced from 50-60% to 5-6%.

Change History (7)

comment:2 by andar, 11 years ago

This looks good. Can you commit it?

comment:3 by Bro, 11 years ago

I don't think I have the permissions ;-)

comment:4 by Calum, 11 years ago

Resolution: Fixed
Status: newclosed

Committed to develop: [feaeee0379]

comment:5 by Calum, 11 years ago

Milestone: performance1.4.0

comment:6 by Calum, 9 years ago

Milestone: 2.0.x2.0

comment:7 by Calum, 6 years ago

Milestone: 2.02.0.0

Milestone renamed

Note: See TracTickets for help on using tickets.