Issue
I'm having a problem with adb on my machine, it runs on OSX Yosemite. I was trying to adb install
a 44mb apk and it took 5 minutes for the apk to be installed. I try to narrow the problem, and it seems that the adb push
has something to do with this.
I tested with adb push -p src dest
to see the transfer progress. The transfer works fine for small files, leaving about 1300KB/s transfer rate. It slows down a lot when transferring large files, about 120KB/s transfer rate. The transfer always slows down at byte 8388608/total.
I've tested adb push with the same device and same USB cable at my coworker's Mac using OSX Yosemite and it works fine. I don't know what causes the problem, could somebody help me?
Solution
According to Performance Tuning the Network Stack on Mac OS X Part 2,
edit your /etc/sysctl.conf
file as follows and reboot your machine.
kern.ipc.somaxconn=2048
net.inet.tcp.rfc1323=1
net.inet.tcp.win_scale_factor=4
net.inet.tcp.sendspace=1042560
net.inet.tcp.recvspace=1042560
net.inet.tcp.mssdflt=1448
net.inet.tcp.v6mssdflt=1412
net.inet.tcp.msl=15000
net.inet.tcp.always_keepalive=0
net.inet.tcp.delayed_ack=3
net.inet.tcp.slowstart_flightsize=20
net.inet.tcp.local_slowstart_flightsize=9
net.inet.tcp.blackhole=2
net.inet.udp.blackhole=1
net.inet.icmp.icmplim=50
I was faced with the same problem and solved it by the above settings.
Answered By - sumio
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.