deathnoise Posted October 26, 2006 Report Share Posted October 26, 2006 .. under Wine 0.9.22I'm using official, free release, not the commercial releases that are using Wine as base system.I wasn't configuring Wine in any way - just installed it from ports and run utorrent.exe as parameter.It's working like a charm. Link to comment Share on other sites More sharing options...
Ultima Posted October 26, 2006 Report Share Posted October 26, 2006 Great to hear (that's the suggested way to run Wine anyway (no need to configure using winecfg or whatever else). Link to comment Share on other sites More sharing options...
deathnoise Posted November 6, 2006 Author Report Share Posted November 6, 2006 I was messing around with utorrent 1.6 under wine..with new version Wine 0.9.24 and freebsd tuning i accomplished reduce of cpu usage from 25-40% to.. amazing 0.05% (!!!!). at least it's what "top" is showing. It's now working better under freebsd than under windows itself.from visible changes, utorrent doesn't freeze anymore every 5 minuteshere are changes that i made:/etc/sysctl.confkern.ipc.somaxconn=16384kern.ipc.nmbclusters=32768kern.ipc.maxsockets=32768kern.ipc.maxsockbuf=16777216net.inet.tcp.rfc1323=1net.inet.tcp.sendspace=1048576net.inet.tcp.recvspace=1048576kern.maxfiles=65536kern.maxfilesperproc=32768#security.bsd.see_other_uids=0net.inet.ip.check_interface=1 # protection against spoof ip packets#net.inet.ip.random_id=1#net.inet.ip.fastforwarding=1#net.inet.ip.process_options=0net.inet.icmp.maskrepl=0net.inet.tcp.rfc3042=1 # Enhancing TCP's Loss Recovery Using Limited Transmitnet.inet.tcp.rfc3390=1 # Increasing TCP's Initial Windownet.inet.tcp.sack.enable=1net.inet.tcp.delayed_ack=0net.inet.tcp.keepidle=300000net.inet.tcp.keepintvl=150net.inet.udp.recvspace=65535net.inet.udp.blackhole=1net.inet.udp.maxdgram=57344net.local.stream.recvspace=65535net.local.stream.sendspace=65535/boot/loader.confkern.ipc.maxsockets="32768"/etc/rc.conf# hi perf configlog_in_vain="1"icmp_bmcastecho="NO"icmp_drop_redirect="YES"tcp_keepalive="YES"tcp_drop_synfin="YES"tcp_extensions="YES" # RFC 1323 - TCP Extensions for High Performancefsck_y_enable="YES"check_quotas="NO"#kern_securelevel_enable="YES"#kern_securelevel="1"clear_tmp_enable="YES"virecover_enable="NO"update_motd="NO"# end of hi perf configmy comp. specs: Athlon 2400xp+, 1gb ram, nforce 2I hope it helps Link to comment Share on other sites More sharing options...
joe7 Posted November 6, 2006 Report Share Posted November 6, 2006 Do you have any idea which one that made CPU usage went down? A few of lines in your sysctl.conf are not need, because those are enabled by default. Thanks for hunt to get CPU usage reduce!# sysctl -a | grep rfc1323net.inet.tcp.rfc1323: 1# sysctl -a | grep rfc3042net.inet.tcp.rfc3042: 1# sysctl -a | grep rfc3390net.inet.tcp.rfc3390: 1# sysctl -a | grep sack\.enablenet.inet.tcp.sack.enable: 1goes on Link to comment Share on other sites More sharing options...
deathnoise Posted November 8, 2006 Author Report Share Posted November 8, 2006 i think it's because of config var's related to limit number of open file/socket descriptors.. FreeBSD has default number of descriptors set at 1024.. it's a way too low, if you want to run p2p service, so setting it up around 32000 did the trick. i think that these variables are responsible:/etc/sysctl.confkern.ipc.somaxconn=16384kern.ipc.nmbclusters=32768kern.ipc.maxsockets=32768kern.maxfiles=65536kern.maxfilesperproc=32768/boot/loader.confkern.ipc.maxsockets="32768" [dunno, if this variable should be set in loader.conf or in sysctlg.conf]i was messing also with headers, and made some changes:changed FD_SETSIZE up to 65536U in:/usr/src/sys/sys/select.h/usr/include/sys/select.hchanged SOMAXCONN up to 16384 in:/usr/include/sys/socket.h/usr/src/sys/sys/socket.hthen:cd /usr/srcmake clean && make cleandependmake buildworld && make installworldmake buildkernel && make installkernelrebooti'm using my system for network programming (multi agents, databases, fastcgi stuff, etc). about default enabled var's - i choosed to enforce these values, because the default ones are sometimes changing, without prior notice from BSD developers p.s [little off-topic]many people don't know, that apache bench is limited by config variable that is setting the number of the open file descriptors, so it would never show results better/higher than 1600 req/seci just made changes described above and after recompilation of httperf (another benchmarking program, without limits of apache), i'm gettings results around 2700 req/sec for simple fastcgi C dynamic, multi-threaded WWW application. try this with PHP, hehe.Oh, and I think that this post should be pinned for all people, that have problems with heavy load under FreeBSD. This could be a solution for their problems. Link to comment Share on other sites More sharing options...
joe7 Posted November 8, 2006 Report Share Posted November 8, 2006 Thanks! I did a bit of homework and found out about that wine developers have committed in wine.git for replace from select() to poll(). It should help with the file descriptors limit issue.http://comments.gmane.org/gmane.comp.emulators.wine.devel/46488You can visit in the above link to collect which files and visit in http://source.winehq.org/git/ to either check history or grab the changes. I can either grab the changes or wait for the next version. Hopeful, it will fixing this CPU usage issue.changed FD_SETSIZE up to 65536U in:/usr/src/sys/sys/select.h/usr/include/sys/select.hUmm, I think I will go with redefine method in wine's source code instead poke around in the system. :-) Link to comment Share on other sites More sharing options...
silverfire Posted November 8, 2006 Report Share Posted November 8, 2006 Stickied Link to comment Share on other sites More sharing options...
joe7 Posted November 8, 2006 Report Share Posted November 8, 2006 The patches of replace from select() to poll() do not solve the CPU usage. I have figured out whicn one in your list of sysctl.conf to get CPU usage reduce by following add these lines below in sysctl.conf.kern.ipc.maxsockbuf=16777216net.inet.tcp.rfc1323=1net.inet.tcp.sendspace=1048576net.inet.tcp.recvspace=1048576I think, the values are a bit too high. I have reduced to 512kb and seems work so far. I will try to go more lower to maybe like 64kb if it possible. I do not know how much utorrent needs the kb. Link to comment Share on other sites More sharing options...
elviselvis Posted November 25, 2006 Report Share Posted November 25, 2006 hi, I also have freebsd6.1, amd2500+ 1gbram pc. I set all the settings in /etc/sysctl.conf , but got a problem with utorrent running in wine. With few torrents it works fine, but now i have 50torrents and it's really slow. At the moment:25.88% wineserver22.95% wineDidn't configure wine, left it with default settings. Is there any way to make utorrent work ok with such amount of torrents? Because on freebsd you don't have a lot of options in choosing a bittorrent client ktorrent and azureus only, but they have many issues. Thou would be greate if utorrent developers would make it for unix operating systems, because I think it's the best bittorrent client at the moment Link to comment Share on other sites More sharing options...
Kuser Posted November 26, 2006 Report Share Posted November 26, 2006 Any idea how much work it takes to make a decent client? Let me tell you, it's not like it's done in a couple of months. Not to mention if you want it to be of the same class as the other bigger clients out there at some point. Nah, if the utorrent developers want to make an unix client i rather think they better either fork KTorrent, or stick heads together with the KTorrent camp in some way. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.