Subject: "lag" Previous topic | Next topic
Printer-friendly copy Email this topic to a friend CF Website
Top General Discussions Gameplay Topic #37213
Show all folders

IsildurMon 28-Feb-11 12:43 AM
Member since 04th Mar 2003
5969 posts
Click to send email to this author Click to send private message to this author Click to view this author's profile Click to add this author to your buddy list
#37213, "lag"


          

Lately I've been experiencing intermittent lag. It happens fairly frequently, but the pause is never more than 1-2 seconds. I could be wrong, but I don't think it's my connection.

Worth investigating?

  

Alert | IP Printer Friendly copy | Reply | Reply with quote | Top

Reply Tell me how it feels after the latest reboot (n/t), Zulghinlour, 22-May-11 12:42 AM, #19
Reply RE: lag, Isildur, 21-May-11 06:36 PM, #13
Reply Feels like it has gotten worse., Dallevian, 21-May-11 06:54 PM, #14
Reply I concur. So bad I've been logging off early because it..., ORB, 21-May-11 07:08 PM, #15
     Reply I've slapped the keyboard or monitor, Dallevian, 22-May-11 11:38 AM, #20
Reply RE: lag, Zulghinlour, 21-May-11 07:39 PM, #16
     Reply RE: lag, Isildur, 21-May-11 08:15 PM, #17
          Reply RE: lag, Zulghinlour, 21-May-11 09:27 PM, #18
               Reply RE: lag, Isildur, 22-May-11 01:31 PM, #21
                    Reply RE: lag, Zulghinlour, 22-May-11 06:47 PM, #22
                         Reply RE: lag, Isildur, 23-May-11 12:01 AM, #23
Reply It feels like the entire mud is slow(er)., Dallevian, 28-Feb-11 10:24 AM, #4
Reply Yes, it happens to me too., Murphy, 28-Feb-11 07:58 AM, #2
Reply RE: Yes, it happens to me too., Isildur, 28-Feb-11 09:08 AM, #3
     Reply RE: Yes, it happens to me too., Isildur, 28-Feb-11 03:45 PM, #5
          Reply Nothing that I'm seeing..., Zulghinlour, 28-Feb-11 09:57 PM, #6
               Reply RE: Nothing that I'm seeing..., Isildur, 28-Feb-11 10:32 PM, #7
                    Reply RE: Nothing that I'm seeing..., Zulghinlour, 28-Feb-11 10:44 PM, #8
                         Reply RE: Nothing that I'm seeing..., Isildur, 01-Mar-11 01:03 AM, #9
                              Reply RE: Nothing that I'm seeing..., Zulghinlour, 02-Mar-11 03:13 AM, #10
                                   Reply RE: Nothing that I'm seeing..., Isildur, 02-Mar-11 10:11 AM, #11
                                        Reply gettimeofday should work on most all linux systems., TheDude, 02-Mar-11 12:56 PM, #12
Reply I thought it might be my connection, blackbird, 28-Feb-11 06:35 AM, #1

ZulghinlourSun 22-May-11 12:42 AM
Member since 04th Mar 2003
9792 posts
Click to send email to this author Click to send private message to this author Click to view this author's profile Click to add this author to your buddy list
#38099, "Tell me how it feels after the latest reboot (n/t)"
In response to Reply #0


          

n/t

So long, and thanks for all the fish!

  

Alert | IP Printer Friendly copy | Reply | Reply with quote | Top

IsildurSat 21-May-11 06:36 PM
Member since 04th Mar 2003
5969 posts
Click to send email to this author Click to send private message to this author Click to view this author's profile Click to add this author to your buddy list
#38091, "RE: lag"
In response to Reply #0


          

Still seeing this, btw. Whenever I do I ask on the newbie channel and usually get broad agreement that it's game-wide and not just my connection. Just thought I'd mention it in case it's fallen off the radar.

  

Alert | IP Printer Friendly copy | Reply | Reply with quote | Top

    
DallevianSat 21-May-11 06:54 PM
Member since 04th Mar 2003
1646 posts
Click to send email to this author Click to send private message to this author Click to view this author's profile Click to add this author to your buddy list
#38092, "Feels like it has gotten worse."
In response to Reply #13


          

Ticks seem to be longer too. But the pause in game is killing me, really breaks the flow of the game.

  

Alert | IP Printer Friendly copy | Reply | Reply with quote | Top

        
ORBSat 21-May-11 07:08 PM
Member since 04th Mar 2003
993 posts
Click to send email to this author Click to send private message to this author Click to view this author's profile Click to add this author to your buddy list
#38093, "I concur. So bad I've been logging off early because it..."
In response to Reply #14


          

No text

That which does not kill us,
makes us stronger.

  

Alert | IP Printer Friendly copy | Reply | Reply with quote | Top

            
DallevianSun 22-May-11 11:38 AM
Member since 04th Mar 2003
1646 posts
Click to send email to this author Click to send private message to this author Click to view this author's profile Click to add this author to your buddy list
#38115, "I've slapped the keyboard or monitor"
In response to Reply #15


          

more than once because I thought wifi or something died. Luckily the game pauses and it isn't packet loss or anything.

  

Alert | IP Printer Friendly copy | Reply | Reply with quote | Top

    
ZulghinlourSat 21-May-11 07:39 PM
Member since 04th Mar 2003
9792 posts
Click to send email to this author Click to send private message to this author Click to view this author's profile Click to add this author to your buddy list
#38095, "RE: lag"
In response to Reply #13


          

>Still seeing this, btw.

And I've got no idea what it is. No clue where to look. Everything in game is running smooth and silky, which means it's likely other processes on the box I have no control over.

So long, and thanks for all the fish!

  

Alert | IP Printer Friendly copy | Reply | Reply with quote | Top

        
IsildurSat 21-May-11 08:15 PM
Member since 04th Mar 2003
5969 posts
Click to send email to this author Click to send private message to this author Click to view this author's profile Click to add this author to your buddy list
#38096, "RE: lag"
In response to Reply #16


          

Do we share the hardware with other folks? I guess I assumed it was dedicated.

  

Alert | IP Printer Friendly copy | Reply | Reply with quote | Top

            
ZulghinlourSat 21-May-11 09:27 PM
Member since 04th Mar 2003
9792 posts
Click to send email to this author Click to send private message to this author Click to view this author's profile Click to add this author to your buddy list
#38097, "RE: lag"
In response to Reply #17


          

>Do we share the hardware with other folks? I guess I assumed
>it was dedicated.

We do share now. Prior to the move it was dedicated hardware.

On the plus side...I do have a new theory...will reboot and test it out in a little bit.

So long, and thanks for all the fish!

  

Alert | IP Printer Friendly copy | Reply | Reply with quote | Top

                
IsildurSun 22-May-11 01:31 PM
Member since 04th Mar 2003
5969 posts
Click to send email to this author Click to send private message to this author Click to view this author's profile Click to add this author to your buddy list
#38125, "RE: lag"
In response to Reply #18


          

So what was the culprit?

  

Alert | IP Printer Friendly copy | Reply | Reply with quote | Top

                    
ZulghinlourSun 22-May-11 06:47 PM
Member since 04th Mar 2003
9792 posts
Click to send email to this author Click to send private message to this author Click to view this author's profile Click to add this author to your buddy list
#38143, "RE: lag"
In response to Reply #21


          

100+ sql queries/updates in the same function.

So long, and thanks for all the fish!

  

Alert | IP Printer Friendly copy | Reply | Reply with quote | Top

                        
IsildurMon 23-May-11 12:01 AM
Member since 04th Mar 2003
5969 posts
Click to send email to this author Click to send private message to this author Click to view this author's profile Click to add this author to your buddy list
#38156, "RE: lag"
In response to Reply #22


          

Holy crap. Yeah, that sounds no bueno.

FWIW I was on for about 30 minutes today and didn't run into any lag.

  

Alert | IP Printer Friendly copy | Reply | Reply with quote | Top

DallevianMon 28-Feb-11 10:24 AM
Member since 04th Mar 2003
1646 posts
Click to send email to this author Click to send private message to this author Click to view this author's profile Click to add this author to your buddy list
#37219, "It feels like the entire mud is slow(er)."
In response to Reply #0


          

As in, the pace of rounds coming are very slow. I feel like I can take a sip of coffee in between rounds. And then there's the lag spikes like you mentioned too.

  

Alert | IP Printer Friendly copy | Reply | Reply with quote | Top

MurphyMon 28-Feb-11 07:58 AM
Member since 30th Dec 2010
1639 posts
Click to send private message to this author Click to view this author's profile Click to add this author to your buddy list
#37215, "Yes, it happens to me too."
In response to Reply #0


          

I never paid attention, but if it lags specifically at tick change, it's probably some prog that needs optimisation. The muds are not processor-intensive, but they typically have peaks of CPU load on tick change.

Otherwise, it may be a problem with the hoster not providing enough bandwidth, losing packets of data or whatever else.

  

Alert | IP Printer Friendly copy | Reply | Reply with quote | Top

    
IsildurMon 28-Feb-11 09:08 AM
Member since 04th Mar 2003
5969 posts
Click to send email to this author Click to send private message to this author Click to view this author's profile Click to add this author to your buddy list
#37217, "RE: Yes, it happens to me too."
In response to Reply #2


          

This was a problem a year or two ago and Zulg fixed it by optimizing a bunch of stuff. I'll dig up that same script I used last time to see if the lag was periodic or if it occurred randomly.

  

Alert | IP Printer Friendly copy | Reply | Reply with quote | Top

        
IsildurMon 28-Feb-11 03:45 PM
Member since 04th Mar 2003
5969 posts
Click to send email to this author Click to send private message to this author Click to view this author's profile Click to add this author to your buddy list
#37223, "RE: Yes, it happens to me too."
In response to Reply #3


          

My script from last time is available here:

http://forums.carrionfields.com/dc/dcboard.php?az=show_topic&forum=6&topic_id=24340&mesg_id=24340&listing_type=search#24342

"go" to start and "off" to stop.

I ran it again and it did indeed show some lag spikes, but they're not regularly occurring and don't seem to be related to game ticks.

99% of all commands had a round trip of ~250 ms, but a few were ~1000 ms and one was 4817 ms. I had ping running simultaneously in a separate window and it didn't register any network issues.

  

Alert | IP Printer Friendly copy | Reply | Reply with quote | Top

            
ZulghinlourMon 28-Feb-11 09:57 PM
Member since 04th Mar 2003
9792 posts
Click to send email to this author Click to send private message to this author Click to view this author's profile Click to add this author to your buddy list
#37226, "Nothing that I'm seeing..."
In response to Reply #5


          

Along with that optimization I added in a boatload of data-mining with regards to performance for the various things that happen at regularly scheduled intervals.

Of those there are two that are over their goals.


|Function |Rate |Max |Goal |Over Goal|
----------------------------------------------------------------------------
|mobile_update() |4 seconds |0.35 sec|0.25 sec|0.10%
|violence_update() |3 seconds |0.18 sec|0.15 sec|0.06%


And of those that do end up being over the goal, it's not that often (or off by that much).

So long, and thanks for all the fish!

  

Alert | IP Printer Friendly copy | Reply | Reply with quote | Top

                
IsildurMon 28-Feb-11 10:32 PM
Member since 04th Mar 2003
5969 posts
Click to send email to this author Click to send private message to this author Click to view this author's profile Click to add this author to your buddy list
#37227, "RE: Nothing that I'm seeing..."
In response to Reply #6


          

Hmm. Are you calling time() to get wall clock time? Or using clock() and CLOCKS_PER_SEC to calculate process time? If the latter, then the monitoring code wouldn't pick up slow ticks caused by I/O waits or another process monopolizing the CPU.

Not trying to patronize you here- just brainstorming. In the minute or so that I let the script run there were maybe 4 or 5 round-trips that were longer than 500 ms. (My ping from work is a ridiculous 7 ms).

  

Alert | IP Printer Friendly copy | Reply | Reply with quote | Top

                    
ZulghinlourMon 28-Feb-11 10:44 PM
Member since 04th Mar 2003
9792 posts
Click to send email to this author Click to send private message to this author Click to view this author's profile Click to add this author to your buddy list
#37228, "RE: Nothing that I'm seeing..."
In response to Reply #7


          

>Hmm. Are you calling time() to get wall clock time? Or
>using clock() and CLOCKS_PER_SEC to calculate process time?
>If the latter, then the monitoring code wouldn't pick up slow
>ticks caused by I/O waits or another process monopolizing the
>CPU.

Good point...I'm using clock() & CLOCKS_PER_SEC...great...now I have more work to do

So long, and thanks for all the fish!

  

Alert | IP Printer Friendly copy | Reply | Reply with quote | Top

                        
IsildurTue 01-Mar-11 01:03 AM
Member since 04th Mar 2003
5969 posts
Click to send email to this author Click to send private message to this author Click to view this author's profile Click to add this author to your buddy list
#37229, "RE: Nothing that I'm seeing..."
In response to Reply #8


          

Both are valuable. clock() teases out problems with the mud code itself while time() catches resource contention issues.

Do you run the mud at certain "nice" and "ionice" levels? Upping both those priorities might help in the short term.

nice -19 ionice -c1 -n0 /path/to/mud/executable {args}

That should give the mud code the absolute highest CPU and I/O priority. (Which may be a bad thing if it monopolizes either.)

  

Alert | IP Printer Friendly copy | Reply | Reply with quote | Top

                            
ZulghinlourWed 02-Mar-11 03:13 AM
Member since 04th Mar 2003
9792 posts
Click to send email to this author Click to send private message to this author Click to view this author's profile Click to add this author to your buddy list
#37235, "RE: Nothing that I'm seeing..."
In response to Reply #9


          

>Both are valuable. clock() teases out problems with the mud
>code itself while time() catches resource contention issues.

Yeah, problem with time() is that it doesn't have the precision since it's smallest unit is one second. I did add in checks using it, so we'll see if anything shows up.

>Do you run the mud at certain "nice" and "ionice" levels?
>Upping both those priorities might help in the short term.

Nope, run the mud at standard priorities. I'll keep it in mind if the recent changes don't turn up anything.

So long, and thanks for all the fish!

  

Alert | IP Printer Friendly copy | Reply | Reply with quote | Top

                                
IsildurWed 02-Mar-11 10:11 AM
Member since 04th Mar 2003
5969 posts
Click to send email to this author Click to send private message to this author Click to view this author's profile Click to add this author to your buddy list
#37242, "RE: Nothing that I'm seeing..."
In response to Reply #10


          

>Yeah, problem with time() is that it doesn't have the
>precision since it's smallest unit is one second.

Doh. Forgot about that. One of these may work:

http://linux.die.net/man/2/gettimeofday
http://linux.die.net/man/3/clock_gettime

First looks more promising. If the system is Solaris you could try:

http://manpages.unixforum.co.uk/man-pages/unix/solaris-10-11_06/9F/gethrtime-man-page.html

>Nope, run the mud at standard priorities. I'll keep it in
>mind if the recent changes don't turn up anything.

Another alternative is to run your non-mud jobs at lower priorities. Like if you're doing a build, running a test server, etc.

  

Alert | IP Printer Friendly copy | Reply | Reply with quote | Top

                                    
TheDudeWed 02-Mar-11 12:56 PM
Member since 20th Sep 2005
285 posts
Click to send email to this author Click to send private message to this author Click to view this author's profile Click to add this author to your buddy list
#37248, "gettimeofday should work on most all linux systems."
In response to Reply #11
Edited on Wed 02-Mar-11 12:56 PM

          


To get the current time, do something like:

#include <sys/time.h>
...
struct timeval start;
gettimeofday(&start, NULL);
long lStart_secs = start.tv_sec;
long lStart_ms = start.tv_usec / 1000;

  

Alert | IP Printer Friendly copy | Reply | Reply with quote | Top

blackbirdMon 28-Feb-11 06:35 AM
Member since 04th Sep 2009
178 posts
Click to send email to this author Click to send private message to this author Click to view this author's profile Click to add this author to your buddy list Click to send message via AOL IM
#37214, "I thought it might be my connection"
In response to Reply #0


  

          

but, yeah, it's affecting me, too. And I'm in the Northwest, not anywhere near Texas. Latency ftl.

  

Alert | IP Printer Friendly copy | Reply | Reply with quote | Top

Top General Discussions Gameplay Topic #37213 Previous topic | Next topic