False network stress

Hey, does anybody know of any way I can raise my ping for some stress testing? Instead of just sending messages ever so and so amount of seconds, a way to actually slow down my network?

there are some (router)vms and some proxys to do so.

@javagame said: Hey, does anybody know of any way I can raise my ping for some stress testing? Instead of just sending messages ever so and so amount of seconds, a way to actually slow down my network?

As you’ve figured out, simulating it in the network layer is absolutely the best way to go. I have not good solutions for that and I’m interesting if you find something.

However, I thought I would point out that the easy way to simulate this “in code” is to add a MessageListener before any others that listens to all message types. It can sleep a fixed or varied amount of time which will cause all listener dispatch to be delayed by that amount. Note: the down side is that the messages actually are being received and you end up potentially simulating errors that would never occur in real life (SpiderMonkey buffer cache overruns or whatever).

But if your game is laggy sometimes and you want to see if it’s network related then throwing a delay listener in can sometimes help pinpoint the issue without resorting to hardware or tcp stack solutions.

I spent some time on work looking for this. I didn’t find an easy solution so please share if you find any.

My conclusion was that to get something resembling real network problems your test setup must have a router that introduces errors. Like http://www.linuxfoundation.org/collaborate/workgroups/networking/netem

@jmaasing said: I spent some time on work looking for this. I didn't find an easy solution so please share if you find any.

My conclusion was that to get something resembling real network problems your test setup must have a router that introduces errors. Like http://www.linuxfoundation.org/collaborate/workgroups/networking/netem

Yeah, likewise re: searching.

I’m really surprised there isn’t some VM-based solution for this. Actually, I’m not sure I looked for that but it seems so logical to want to do.

D’oh… so, on my other machine I had VMWare player open so I took a look. There are advanced settings for configuring network packet loss. I don’t have VirtualBox open at the moment but it would surprise me very much if it didn’t have similar.

In that case, you could run the server in a VM and configure some amount of packet loss or cap the bandwidth (or both) so simulate bad network comms.

@pspeed said: Yeah, likewise re: searching.

I’m really surprised there isn’t some VM-based solution for this. Actually, I’m not sure I looked for that but it seems so logical to want to do.

I looked into that using 1 physical machine, the server is a virtual machine, going through a virtual router out to the real host which is the one running the client. That is certainly doable - if someone spends time making images of that setup it would be great.

For the day-job that wasn’t an option since it would still be the same IP stack everything went through (the virtual stack on the host) and that would’ve skewed the results for what we were looking for.

assuming you are udp based

@Empire Phoenix said: http://sourceforge.net/projects/gamersproxy/

assuming you are udp based

Thanks for this, it seems very useful but I can’t get it set up right:

  1. It seems to be blocking all tcp messages
  2. I can’t notice and difference raising my ping by 60, 600, or 6000, My ping counter isn’t even going up… Might be something to do with the fact the program says I’m not recieving packs from the server… Maybe it doesn’t work when the server is on localhost, though I can’t see why not… I will have more of a play around, maybe even read the manual, and report back. Thank you.

EDIT: Might be something to do with the fact that spidermonkey doesn’t let me connect through local host, I’ve been using my own IP address for ages…

I have a feeling you’re going to stress the CPU before you remotely stress the network because of the sheer speed betwen the “client” and the “server” since they are both the same machine. The only way I am aware that you can do what you are trying to do is some form of “slow” attack such as a syn flood and thereby flooding long-standing connections as opposed to traffic flooding. I’m still doubtful, though.

This kind of situation is really grey and I’m hesitant to share knowledge on the matter. Though I will say that it’s surprisingly easy to do.