Bitcoin Forum

Other => CPU/GPU Bitcoin mining hardware => Topic started by: jamesg on January 28, 2012, 02:52:55 PM



Title: Best router / router firmware to use with cgminer
Post by: jamesg on January 28, 2012, 02:52:55 PM
Hello fellow bitcoiners,

I have started to migrate over to cgminer and have found that my router cannot handle all of the extra traffic that cgminer generates. I currently have a cisco wrv210 (small business) router and wanted to get others opinions on what router and firmware you are using to handle the traffic cgminer creates. I am running 32Gh right now and it will so grow to double this so I need a pretty robust solution.

Also, if you have any cgminer specific optimizations around network traffic, I would like to hear about them also.

Best,
gigavps


Title: Re: Best router / router firmware to use with cgminer
Post by: NetworkerZ on January 28, 2012, 04:25:15 PM
What is the connection speed at the moment? How high is the throuput cgminer produces at the moment? What throuput would you need with ~60 GHash?

Greetz
NetworkerZ


Title: Re: Best router / router firmware to use with cgminer
Post by: grue on January 28, 2012, 04:32:24 PM
i don't think that wrv210 can even handle custom firmwares.

all miners behave the same way when it comes to connections. 1 constant longpoll connection + a few http GET. If i were you, i would get a high quality network switch that can handle all the persistent connections. a better internet connection wouldn't hurt either.


Title: Re: Best router / router firmware to use with cgminer
Post by: jamesg on January 28, 2012, 04:40:25 PM
i don't think that wrv210 can even handle custom firmwares.

all miners behave the same way when it comes to connections. 1 constant longpoll connection + a few http GET. If i were you, i would get a high quality network switch that can handle all the persistent connections. a better internet connection wouldn't hurt either.

Is there specific router / switch hardware you would recommend?


Title: Re: Best router / router firmware to use with cgminer
Post by: jamesg on January 28, 2012, 04:42:04 PM
What is the connection speed at the moment? How high is the throuput cgminer produces at the moment? What throuput would you need with ~60 GHash?

Greetz
NetworkerZ

I am assuming you are asking about my internet connection speed? Currently it is 2Mb up and 1Mb down. I am not that skilled in network analysis and have not researched what is needed to look at the network traffic.


Title: Re: Best router / router firmware to use with cgminer
Post by: kokjo on January 28, 2012, 04:44:40 PM
go solo?

pros:
does not generate a lot of (internet-)network traffic. only LAN traffic.

cons:
higher variance.


Title: Re: Best router / router firmware to use with cgminer
Post by: grue on January 28, 2012, 05:48:36 PM
What is the connection speed at the moment? How high is the throuput cgminer produces at the moment? What throuput would you need with ~60 GHash?

Greetz
NetworkerZ

I am assuming you are asking about my internet connection speed? Currently it is 2Mb up and 1Mb down. I am not that skilled in network analysis and have not researched what is needed to look at the network traffic.
i'm guessing it's megabytes (not megabits) right? see if your router can log the bandwidth used + # of connections.

go solo?

pros:
does not generate a lot of (internet-)network traffic. only LAN traffic.

cons:
higher variance.
2 days per block isn't too bad.


Title: Re: Best router / router firmware to use with cgminer
Post by: malevolent on January 28, 2012, 06:46:33 PM
i'm guessing it's megabytes (not megabits) right? see if your router can log the bandwidth used + # of connections.

When you order Internet connection service the ISP usually provides the speed in Mb not MB.


Title: Re: Best router / router firmware to use with cgminer
Post by: despoiler on January 28, 2012, 07:22:22 PM
i'm guessing it's megabytes (not megabits) right? see if your router can log the bandwidth used + # of connections.

When you order Internet connection service the ISP usually provides the speed in Mb not MB.

Bandwidth is listed in Mb.  Storage sizes are listed in MB. 


Title: Re: Best router / router firmware to use with cgminer
Post by: BCMan on January 28, 2012, 09:06:40 PM
i'm guessing it's megabytes (not megabits) right? see if your router can log the bandwidth used + # of connections.

When you order Internet connection service the ISP usually provides the speed in Mb not MB.

Bandwidth is listed in Mb.  Storage sizes are listed in MB.  
Usually MB means megabyte, Mb=megabit, for bandwidth as well.
 http://en.wikipedia.org/wiki/MB
 And as for router I can recommend D-Link brand. Even mine cheap D-Link DIR-615 working without probs by downloading\uploading for example, torrent, with 350 connections and 5-6 MB/s.


Title: Re: Best router / router firmware to use with cgminer
Post by: bangra on January 28, 2012, 10:11:27 PM
Happy with my Draytek 2820 but maybe with 60GHash it might be worth looking at having an additional connection added and load balance it all, would provide a failover also as having that much kit idling due to no internet would still burn a fair bit of power


Title: Re: Best router / router firmware to use with cgminer
Post by: Unacceptable on January 28, 2012, 10:13:12 PM
My residential connection is 6mb down & 3 mb up.You need to upgrade your connection at least.

As for hardware,I'm not familar with buisness class,sorry :-[


Title: Re: Best router / router firmware to use with cgminer
Post by: NetworkerZ on January 28, 2012, 10:18:46 PM
First thing I would do is get to know how much traffic one RIG produces in 24 hours. If you get this, post it here.

Greetz

NetworkerZ


Title: Re: Best router / router firmware to use with cgminer
Post by: trouserless on January 28, 2012, 10:48:33 PM
Hello fellow bitcoiners,

I have started to migrate over to cgminer and have found that my router cannot handle all of the extra traffic that cgminer generates. I currently have a cisco wrv210 (small business) router and wanted to get others opinions on what router and firmware you are using to handle the traffic cgminer creates. I am running 32Gh right now and it will so grow to double this so I need a pretty robust solution.

Also, if you have any cgminer specific optimizations around network traffic, I would like to hear about them also.

Best,
gigavps

What are you seeing that leads to you think the router is the problem?  Can you describe the problems you are seeing since your switch to cgminer?  Your router has 10/100 full duplex LAN ports that according to Cisco can support 93Mb of NATed traffic (http://www.cisco.com/en/US/prod/collateral/routers/ps9923/ps9929/data_sheet_c78-502735.html) which is 91Mb more than your uplink can handle ;-)  I agree with the previous posts about the uplink being the problem, not the router.

IIRC you've got a giant farm of miners...how many switches are you chaining together that eventually NAT through this one?  That may be some of the problem (routing loops, poor cables, bad crimp jobs).

I also think you might want to look into solo mining too...I'm doing calculations with my paltry 3GH/s...variance for you would not be noticeable!


Title: Re: Best router / router firmware to use with cgminer
Post by: grue on January 28, 2012, 10:50:44 PM
if it's megabits, then it's too little.
First thing I would do is get to know how much traffic one RIG produces in 24 hours. If you get this, post it here.

Greetz

NetworkerZ
or use taskmanager and look at the network graph ::)


Title: Re: Best router / router firmware to use with cgminer
Post by: trouserless on January 28, 2012, 11:19:42 PM
if it's megabits, then it's too little.
First thing I would do is get to know how much traffic one RIG produces in 24 hours. If you get this, post it here.

Greetz

NetworkerZ
or use taskmanager and look at the network graph ::)

that's the ticket...hop on the command line of one of your rigs and check the interface (sudo ifconfig).  It will look something like this:
Code:
eth0      Link encap:Ethernet  HWaddr 00:25:22:dd:e6:11  
          inet addr:192.168.1.221  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::225:22ff:fedd:e611/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1617742 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1807687 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:321397347 (306.5 MiB)  TX bytes:301513754 (287.5 MiB)
          Interrupt:66 Base address:0xc000

So this system has been up for 3 days (uptime) and has sent and received roughly 300Mb, or roughly 100Mb/day running bamt.  Average that out over a day at around 1100b/s and I could sustain 900 miners on 1Mb.

What else are you running on this LAN?  A lot of chatter could fill up tables internal to the router...

What


Title: Re: Best router / router firmware to use with cgminer
Post by: trouserless on January 29, 2012, 12:13:16 AM
So this system has been up for 3 days (uptime) and has sent and received roughly 300Mb, or roughly 100Mb/day running bamt.  Average that out over a day at around 1100b/s and I could sustain 900 miners on 1Mb.

100 (megabytes per day) = 0.00925925926 megabits per second per miner
Miners/megabit downstream = 1 / 0.00925925926 = ~108 miners/1mbps downstream

And that would saturate the connection, so you'd never get that. I suspect some of your traffic is the BAMT monitoring daemon or local http traffic, though.

ahhh you are so right...bitten by the old Mb/MB mistake when it clearly says "RX bytes".  thx


Title: Re: Best router / router firmware to use with cgminer
Post by: BkkCoins on January 29, 2012, 01:24:50 AM
You're most likely seeing problems with open connections / NAT tables rather than bandwidth. I'd just configure a few of your miners to act as routers as well. How many machines do you have running Linux? Linux is dead simple to configure as a router. Only a few commands and config so it starts on boot.

If you config'd one machine out of 8 to be a router then the NAT tables for that group would be reduced to only one entry on the "master" router. The master router can just aggregate the Linux routers.

Anyway, if you want something independent - I set up a miniITX board as an Ubuntu router with  Gigabit ports. It can handle huge amounts of traffic with thousands of open connections without problems. Much more than eg. my Linksys WRT54GL, which can only handle 100-200 open connections before bogging down (tested with BitTorrent).

Any spare board and an extra LAN card can be setup as a router this way.


Title: Re: Best router / router firmware to use with cgminer
Post by: jamesg on January 29, 2012, 01:50:20 AM
You're most likely seeing problems with open connections / NAT tables rather than bandwidth. I'd just configure a few of your miners to act as routers as well. How many machines do you have running Linux? Linux is dead simple to configure as a router. Only a few commands and config so it starts on boot.

If you config'd one machine out of 8 to be a router then the NAT tables for that group would be reduced to only one entry on the "master" router. The master router can just aggregate the Linux routers.

Anyway, if you want something independent - I set up a miniITX board as an Ubuntu router with  Gigabit ports. It can handle huge amounts of traffic with thousands of open connections without problems. Much more than eg. my Linksys WRT54GL, which can only handle 100-200 open connections before bogging down (tested with BitTorrent).

Any spare board and an extra LAN card can be setup as a router this way.

Hey BkkCoins, I have 18 rigs right now running linux. I have two switches, which each have a port going to the router.

I also think you are correct on the open connections.

jimbit recommended tomato on a compatible router. Per the FAQ, it can handle 4096 open connections. I think I'll be doing this.



Title: Re: Best router / router firmware to use with cgminer
Post by: gnar1ta$ on January 29, 2012, 02:03:29 AM
New cgminer flag for slower routers will be in new release --net-delay might solve it for free.
https://bitcointalk.org/index.php?topic=28402.msg709736#msg709736 (https://bitcointalk.org/index.php?topic=28402.msg709736#msg709736)


Title: Re: Best router / router firmware to use with cgminer
Post by: jjiimm_64 on January 29, 2012, 03:35:54 AM
You're most likely seeing problems with open connections / NAT tables rather than bandwidth. I'd just configure a few of your miners to act as routers as well. How many machines do you have running Linux? Linux is dead simple to configure as a router. Only a few commands and config so it starts on boot.

If you config'd one machine out of 8 to be a router then the NAT tables for that group would be reduced to only one entry on the "master" router. The master router can just aggregate the Linux routers.

Anyway, if you want something independent - I set up a miniITX board as an Ubuntu router with  Gigabit ports. It can handle huge amounts of traffic with thousands of open connections without problems. Much more than eg. my Linksys WRT54GL, which can only handle 100-200 open connections before bogging down (tested with BitTorrent).

Any spare board and an extra LAN card can be setup as a router this way.

Hey BkkCoins, I have 18 rigs right now running linux. I have two switches, which each have a port going to the router.

I also think you are correct on the open connections.

jimbit recommended tomato on a compatible router. Per the FAQ, it can handle 4096 open connections. I think I'll be doing this.



actually, it will handle more..  this is my current status from tomato.

Code:
Connections
Maximum Connections [8192]   (3841 connections currently tracked)


Title: Re: Best router / router firmware to use with cgminer
Post by: singular on January 29, 2012, 11:45:44 AM
dd-wrt is also very good firmware for compatible routers.. makes a $50 router giving a lot of bang for the buck :)


Title: Re: Best router / router firmware to use with cgminer
Post by: MiningBuddy on January 29, 2012, 02:11:38 PM
I run WRT54GL's with DD-WRT firmware, I have about 8 across my house, from router modes to wifi extenders and even vpn client/server. Works wonders and very cheap, you can also overclock their cpus  :D


Title: Re: Best router / router firmware to use with cgminer
Post by: jamesg on January 29, 2012, 02:28:50 PM
I run WRT54GL's with DD-WRT firmware, I have about 8 across my house, from router modes to wifi extenders and even vpn client/server. Works wonders and very cheap, you can also overclock their cpus  :D

Funny you should mention that. I just ordered this one off of amazon.

http://www.amazon.com/gp/product/B000BTL0OA/

Gotta love their prime program!


Title: Re: Best router / router firmware to use with cgminer
Post by: jjshabadoo on January 29, 2012, 06:59:37 PM
I'd also go for a better internet plan if it's available. I get 35-40 meg down and 7-8 up from comcast in my cable package. Also, if you go cable internet, don't use their modem, buy a motorola surfboard with docsis 3.0 It gives you faster speed even though they say it won't. They still use docsis 2.0, but the router they had set up for me was doing 20 meg down and 4-5 up.

Just make sure if you buy your own modem you make sure it is compatible with our carrier, some are not.


Title: Re: Best router / router firmware to use with cgminer
Post by: jamesg on January 29, 2012, 07:13:06 PM
I'd also go for a better internet plan if it's available. I get 35-40 meg down and 7-8 up from comcast in my cable package. Also, if you go cable internet, don't use their modem, buy a motorola surfboard with docsis 3.0 It gives you faster speed even though they say it won't. They still use docsis 2.0, but the router they had set up for me was doing 20 meg down and 4-5 up.

Just make sure if you buy your own modem you make sure it is compatible with our carrier, some are not.

I checked on my internet plan. It's 3Mb down and 450k up. I am on a business plan so the rates are a little higher as they provide same day service if something goes wrong. I'll look into the modem more.


Title: Re: Best router / router firmware to use with cgminer
Post by: BCMan on January 29, 2012, 07:43:23 PM
I run WRT54GL's with DD-WRT firmware, I have about 8 across my house, from router modes to wifi extenders and even vpn client/server. Works wonders and very cheap, you can also overclock their cpus  :D

Funny you should mention that. I just ordered this one off of amazon.

http://www.amazon.com/gp/product/B000BTL0OA/

Gotta love their prime program!
Wireless G. Ouch.  :-X Pretty bad choice imo, even for a pure WAN router, because it's pretty unstable with high load and stops working after some time even with 5 mbit fully loaded connection, not to mention it's a dinosaur. Why not D-Link?  ??? Rock solid stability even with 100 mbit download/upload and also support custom firmware, DD-WRT as well. And even cheaper, if talk about DIR-615. WRT54GL (200 mhz & 16 mb ram) = $49.99 vs DIR-615 (400 mhz & 32 mb ram + wireless N+ 300 dual band) = $38.21.


Title: Re: Best router / router firmware to use with cgminer
Post by: grue on January 29, 2012, 09:38:10 PM
dd-wrt is also very good firmware for compatible routers.. makes a $50 router giving a lot of bang for the buck :)
dd-wrt is mostly bloat. tomato is leaner ;D
I run WRT54GL's with DD-WRT firmware, I have about 8 across my house, from router modes to wifi extenders and even vpn client/server. Works wonders and very cheap, you can also overclock their cpus  :D

Funny you should mention that. I just ordered this one off of amazon.

http://www.amazon.com/gp/product/B000BTL0OA/

Gotta love their prime program!
make sure it's the "linux" version. otherwise, you're getting a neutered version with a shitty cpu + low ram.


Title: Re: Best router / router firmware to use with cgminer
Post by: jake262144 on January 29, 2012, 10:12:32 PM
make sure it's the "linux" version. otherwise, you're getting a neutered version with a shitty cpu + low ram.
Yeah, he got (http://www.amazon.com/gp/product/B000BTL0OA/) the right device (http://wiki.openwrt.org/toh/start#linksys).
There's OpenWRT too, another great distro.


Title: Re: Best router / router firmware to use with cgminer
Post by: jamesg on January 29, 2012, 11:15:28 PM
make sure it's the "linux" version. otherwise, you're getting a neutered version with a shitty cpu + low ram.
Yeah, he got (http://www.amazon.com/gp/product/B000BTL0OA/) the right device (http://wiki.openwrt.org/toh/start#linksys).
There's OpenWRT too, another great distro.


jimbit uses the tomato usb router firmware and runs 40Gh so I'm going to stick with what he is doing.  ;)


Title: Re: Best router / router firmware to use with cgminer
Post by: jake262144 on January 29, 2012, 11:36:15 PM
NP, all those firmwares bestow industrial-grade capabilities on the cheap, plastic router.
Best of luck, Giga, and do be careful not to brick your router by accident.


Title: Re: Best router / router firmware to use with cgminer
Post by: BkkCoins on January 30, 2012, 12:21:59 AM
I have both of those routers (WRT54GL and DIR-615). Both work fine with ddWRT. That DIR-615 was ultra-cheap for me and I use 2 of them as a Wifi bridge to get the net 200 meters to my house (with simple parabolic mesh behind antenna).

I hope Tomato has better efficiency than ddWRT because both routers, for me, could not handle lots of open connections well. They have the code smarts but seem to not have enough oomph speed wise. Hopefully Tomato will work for you as I haven't used that one. It could also be a combo problem for me as with BT there is not just open connections but lots of BW at same time (though I'm only on a 5 Mbps link here).

...

If not, then a $5 LAN card into one of your miners will work better than either router. Your miner probably isn't using more than a few % cpu and the router layer (iptables etc) won't use more than 1% even fully, fully loaded. The setup is simple enough. You group 8-9 miners on one switch and choose one of them to be router. Put the extra LAN card in that machine. Install dnsmasq (apt-get install dnsmasq), which gives you both DHCP and DNS forwarding, make a few cfg edits (many tutorials around). Connect first LAN to switch as usual (no change). Connect second LAN card upstream to outbound router/modem. Enable tcp forwarding, add a gateway route command, and it should work (again lots of tutorials around on this). You can add extra firewall rules and stuff but it's probably not needed if you're already behind another router.

I just mention this for anyone needing a cheap/powerful solution. With so many machines doing very little CPU work there's plenty of untapped potential there.


Title: Re: Best router / router firmware to use with cgminer
Post by: AniceInovation on January 30, 2012, 01:10:31 AM
Was using a Asus WL-500gP v1 with tomato, it was fine but the internet was a bit sluggish (14Gh).
I had this old P3 with 512mb ram, tried pfsense. Never went back.


Title: Re: Best router / router firmware to use with cgminer
Post by: floeti on February 01, 2012, 04:37:58 PM
If you want to be future proof, take this one: Buffalo WZR-HP-AG300H. Has plenty of RAM and fast CPU (680MHz). Comes preinstalled with DD-WRT and is supported by OpenWRT, too.

The WRT54's CPU (200MHz) is not even able to route more than 30Mbit/s.


Title: Re: Best router / router firmware to use with cgminer
Post by: JWU42 on February 01, 2012, 05:50:46 PM
I have far less than 32 GH/s but will say I'd imagine no problem with a http://pfsense.org/ (http://pfsense.org/) box.  My old P4 1.8 lappy has been running it for 3 years.


Title: Re: Best router / router firmware to use with cgminer
Post by: jake262144 on February 01, 2012, 06:30:07 PM
Even a P2 would of been fine. The only issue is energy usage. I seriously doubt your lappy is satisfied with 5 Watts of power which is plenty for the plastic routers.

Floeti, you are absolutely right with that Buffalo monster, except it's a total overkill as no mining farm will ever come close to such network utilization.
It's a great choice for a power user consuming sick amounts of bandwidth, no doubt about that.

Let's try not to get overboard guys, Gigavps (https://bitcointalk.org/index.php?action=profile;u=19617) has been running his massive farm over a lowly 6Mb/3Mb pipe (https://bitcointalk.org/index.php?topic=61528.msg719302#msg719302).

That cheap WRT flashed with DDwrt/OpenWrt/Tomato will easily take care of all his badwidth and will be able to host a secure VPN server as well.

Gigavps, just be sure to turn the radio off if you're not using it, or at least tune the TX power down, lest your Wi-Fi should present a target.
Even if unable to breach the properly secured WiFi, some tenacious attacks are able to peg the CPU at 100% or even take the whole device down.
Don't ever use the WPS feature,  a protocol weakness poses a serious security liability (http://www.kb.cert.org/vuls/id/723755).
Neither is there any reason to choose the ancient and horribly broken WEP encryption.
Just tossin in my 2 Bitcents :)


Title: Re: Best router / router firmware to use with cgminer
Post by: DeathAndTaxes on February 01, 2012, 06:40:46 PM
jimbit uses the tomato usb router firmware and runs 40Gh so I'm going to stick with what he is doing.  ;)

Did he say what hardware he runs it on?  I also am looking for recommendations.  I haven't run into any problems but I know insufficient simultaneous connection issues do exist and can create weird and hard to troubleshoot slowdowns.  Worse no company advertizes supported # of connections.

Would rather move to tomato now.


Title: Re: Best router / router firmware to use with cgminer
Post by: jake262144 on February 01, 2012, 06:59:43 PM
DAT, unless you need to constantly route >10Mb of traffic over the WAN interface, any cheapo plastic router will do.

My old WRT54GL reflashed with DD-WRT is supposedly able to take care of 4k simultaneous connections...
The Buffalo mentioned recently is a beast. Were I to choose a new router today, I'd choose it over the old WRT routers for its Gb-E and N Wi-Fi.
Still, I've got a hunch that the elderly Linksys ain't going anywhere any time soon.



Title: Re: Best router / router firmware to use with cgminer
Post by: DeathAndTaxes on February 01, 2012, 07:03:49 PM
I heard you but routers are horribly under documented.  They are like toasters given the amount of useful specs they provide.  Plus they have all kinds of hidden gotchas and traps.  My DIR-615 doesn't route multicast from the WAN side (which is necessary to convert WOL to WOW).  No documentation, no warning.  It lets you set it in port forwarding and then silently drops the packets.  Nothing in the log either.

"is supposedly able to take care of 4k simultaneous connections"
and it may or it might not.  It might hit some hard limit at x connections (where x < 4096) due to some undocumented hardware limitation.

So if someone has a major farm and is using X I would rather just use X given how pitiful documentation on routers is.


Title: Re: Best router / router firmware to use with cgminer
Post by: jake262144 on February 01, 2012, 07:16:19 PM
supposedly ;D
1653 active WAN connections brought the WRT's CPU usage to 57%...
I'll do something more drastic when I have some time to spare. Stay tuned.


Title: Re: Best router / router firmware to use with cgminer
Post by: jamesg on February 04, 2012, 04:55:14 AM
Ok. I have finally gotten around to setting up tomato on my wrt54gl router. First off, tomato is amazing!

Secondly, I have cgminer now running on every one of my rigs!  ;D  ;D  ;D

It looks like the culprit was the total number of open connections. Tomato is reporting I have between 4800 and 5200 tracked connections at any point in time.

I'll be doing some more tweaking over the weekend and we'll see where we get to. For now though, it's tomato FTW!


Title: Re: Best router / router firmware to use with cgminer
Post by: -ck on February 04, 2012, 05:35:54 AM
Sweet  :D


Title: Re: Best router / router firmware to use with cgminer
Post by: deslok on February 04, 2012, 06:45:43 AM
looks like i'm late to this party i was going to reccomend a linksys e4200 i've thuroughly abused mine and it's been flawless(as opposed to a netgear that i cooked with just one mining rig early on ...)