aMule Bug Tracker - aMule
View Issue Details
0001209aMuleTransferpublic2007-11-25 17:352008-02-17 02:39
kubrick 
 
normalblockalways
acknowledgedopen 
SVN 
 
Debian etch amd64 with wxGTK 2.6.8
0001209: amule doesn't use all the brandwidth
I'm using amule CVS 20071125 on a server with a 100Mbps connexion to the internet. amule and amulecmd don't use the whole upload brandwidth, even if I set max UL rate to 0 or 12000kBps. It uploads data at a 1~2MB/s rate and queue clients even if there is still free brandwidth.
At that rate amule is consuming about 30% of cpu so CPU is not limitating. Still at that rate the ping time is good, so I don't think that amule "detects" that the line is full..
No tags attached.
Issue History
2007-11-25 17:35kubrickNew Issue
2007-11-25 17:35kubrickOperating System => Debian etch amd64 with wxGTK 2.6.8
2007-11-29 11:16kubrickNote Added: 0002468
2007-11-29 11:17kubrickNote Edited: 0002468
2008-02-17 02:39XaignarStatusnew => acknowledged

Notes
(0002468)
kubrick   
2007-11-29 11:16   
(edited on: 2007-11-29 11:17)
In src/UploadBandwidthThrottler.cpp, for each packet sent, we have a minimum sleep time of 1ms because of :


const uint32 TIME_BETWEEN_UPLOAD_LOOPS = 1;
[...]
uint32 extraSleepTime = TIME_BETWEEN_UPLOAD_LOOPS;
[...]
uint32 sleepTime;
        if(allowedDataRate == 0 || allowedDataRate == _UI32_MAX || realBytesToSpend >= 1000) {
            // we could send at once, but sleep a while to not suck up all cpu
            sleepTime = extraSleepTime;
        } else {
            // sleep for just as long as we need to get back to having one byte to send
            sleepTime = std::max((uint32)ceil((double)(-realBytesToSpend + 1000)/allowedDataRate), extraSleepTime);
        }


So we can only send a maximum of 1000 packets each second. 1 packet weighing about 1,5kB, the max upload rate should be 1,5MB/s. This is exactly what I am having. So I guess the problem must be here.

Am I wrong?

modifié le : 11-29-07 11:17