Registered Member
|
Hi guys,
I'm using svn build for couple of months, and now I have couple of questions, as it seems that nobody else neither have these, nor at least commented on these problems. 1. CPU Slow - Fast, settings makes no difference, whatever I set, it eats up between 20-30 % CPU. 2. Memory usage - set to Low, but ktorrent process grows up to 1.9GB in size. 3. Outrageous use of getpeername(), gettimeofday(), thousands of times per second, all wasting up precious cpu cycles. I bet that there are more syscalls like that. 4. As of Fedora7 upgrade, I'm getting strange KDE window whenever ktorrent tries to move .kde/share/apps/ktorrent/log file, which waits for user inpun on whether to overwrite or suggest new name. This is somewhat annoying, as it tends to pop up when I'm in the middle of doing some other work at keyboard. 5. In relation to 4, there is no obvious way to disable logging. Am I correct on that ? In overall, after running ktorrent for a day (approximately) it eats up so many resources, that desktop becomes unusable. Few things about my system: It is AMD64, 1GB ram, total of 600GB storage on 1 ATA and 2SATA disks, ext2 and fat32 filesystems. Distro is Fedora 7 - (it was FC6 until recently). There are about 20+ torrents downloading at any time, up/down link is 512k, but limited to 32kb dn/ 5kb up in ktorrent settings. So, if anyone is willing to provide some input on these issues, it would be very good to know if these are going to be addressed, or should I get my hands dirty, and do some constructive butchering of code Greetings, Vladimir |
Moderator
|
This is only used when upload or download limits are set. Anyway, you have to remember the more torrents you run, the more CPU will be used.
As far as we know there are no memory leaks, so this should not happen I will keep an eye on the memory usage.
getpeername shouldn't happen much. There is actually only one call to getpeername in the code, so caching this is not much effort. As for gettimeofday, that is cached to a certain degree, but it is still used a lot because we need accurate timing for speed limits. Though looking through the code, there are some places where we can still get rid of them by using the cached time.
This should not happen in a recent svn version, the log rotate automatically overwrites files. So unless there is some sort of global option which overrides the parameters we pass to KIO::file_move, this should not happen.
No |
Registered Member
|
Just a quick note - current memory usage:
Also, for gettimeofday(), I've made quick hack, to call gettimeofday() at every 500th call of Now(). I still get around 4000 gettimeofday()'s per SECOND. The KT_PROFILE doesn't seems to be enabled, so most probably this is not comming from profiler. |
Registered Member
|
|
Moderator
|
I have replaced several calls to Now by GetCurrentTIme, which uses a cached value which gets updated only a couple of a times per second.
Anyway the bulk of these calls is probably in the networking threads and they need to have accurate timing. So they can be called a lot. The question is, is this really a problem ? I guess it's time to start profiling this. Concerning the memory usage, what kind of stuff are you running ? What plugins ? Is DHT enabled ? |
Registered Member
|
Only file info plugin, and DHT is disabled.
On the topic of networking stuff that needs accurate timing, I will have to take a closer look at how it is implemented, as I'm sure that I/O limits can be implemented in resource friendly manner. In fact, I've done that before, in commercial product that I'm working on, we have anything between 7000 - 10000 open connections, with I/O limiting, and I/O going up to 100Mbps.. but processes actually have time to do something usefull beside of limiting output So I will take a look as soon as I'm near my home computer. |
Registered Member
|
Registered users: Bing [Bot], Google [Bot], Yahoo [Bot]