Click to See Complete Forum and Search --> : too many pipes?


jlewicki
July 2nd, 2007, 09:26 AM
I'm fooling around with pipes and I've got a basic duplex working. The server opens a child(cmd.exe) and then pings a server with 1 count. I take this information and output it on the parent, notifying if the server that i just pinged is still available.

My intention is to get this server moderating about 40 clients(child processes of cmd) -- all of which are pinging a different server every 30 seconds with 1 packet.

The problem i have noticed is that each instance of cmd is racking up around 2.5 megs of memory which is unacceptable -- by the time i get up to 40 servers, I am looking at at least 100 megabytes of memory.

The servers can't have anything installed on them, so thats leaving me with ICMP I believe (system calls, hence cmd).

Having all the pings taking place on 1 instance of command imo wouldn't work. The more servers I would have to ping, the longer between updates of the individual server. And if a server was ever to not reply, the entire chain would be backed up.

Is there a more efficient way of doing this?

Boris K K
July 2nd, 2007, 11:11 AM
Is there a more efficient way of doing this?

Yes. Implement ping in your main application.

IcmpSendEcho (http://msdn2.microsoft.com/en-us/library/aa366050.aspx).