Go Back   EQEmulator Home > EQEmulator Forums > Support > Support::Linux Servers

Support::Linux Servers Support forum for Linux EQEMu users.

Reply
 
Thread Tools Display Modes
  #1  
Old 07-11-2009, 05:34 PM
Dolrese
Fire Beetle
 
Join Date: Mar 2008
Posts: 26
Default cpu lag

ok guys i have a prob i just set my server up on new hosting and im having issuse everything copiled correctly then i turned it on and i get lag on a really nice 100 meg connection. it only some zones though but there ones that worked just fine with the old server setup. the server specs are close tot he same the new one abit slower because it has 1 less processor.

i was running Debian with no probs sept had a bad connection the new connection i am using centos 5.0.

this is what i get when i run the top command



that's with only 40 or so players get more then that and the average load goes up to 50-70 that's bogging down the zones. now see mysql there.. we are thinking from the checks we have made that is is mysql making to many calls at a time and stuff slowing it down and having to wait inline to make new calls but not 100% sure..

basically we are not 100% sure what is going on and wondering if anyone else has had or is haveing this problem and came to any conclusions.. let me know any info you need and i can get it posted here also. if it makes it easyer for you rather then talking on the forums we have a vent we can use to talk mic or no mic we still have live chat.. anyways let me know.
Reply With Quote
  #2  
Old 07-12-2009, 05:41 PM
gaeorn
Developer
 
Join Date: Apr 2009
Location: USA
Posts: 478
Default

It is very difficult to diagnose a performance problem under linux with just one screenshot of top. There are simply too many factors. However, I can give you some pointers as to where to look.

Since this ran well on a prior server, I would look for any differences between the two systems. You said the new one is missing one CPU, but since in that screenshot you are showing 45% idle time, that is less likely to be the issue. Have you looked at the performance numbers for the hard disk to see if it differs significantly from the old system? Is MySQL configured exactly the same with all the same table types, etc., as the old system?

Just look for anything that is different, no matter how slight a change. One (or more) of those changes should be the cause.
Reply With Quote
  #3  
Old 07-12-2009, 05:55 PM
pfyon's Avatar
pfyon
Discordant
 
Join Date: Mar 2009
Location: Ottawa
Posts: 495
Default

You could check the configuration for mysql, or do some diagnostics on the queries being used. How many threads is mysql set up to use? Could be a thrashing problem, but who knows without a bit more looking.
Reply With Quote
  #4  
Old 07-12-2009, 06:16 PM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

Is this for SoA? Just curious, because I got a PM on my forums about a similar issue with them, and I don't want to work the same issue from here and through PM at the same time.

What revision of source is the server running? A while back, there was a few versions put up that had a particularly nasty loop in the code that was driving CPU utilization way up. Also, have you tried checking the logs to see if this might be something related to a quest script gone wrong?

Check the following function in Hatelist.cpp and verify that the iterator.Advance(); in red is in your source:

Code:
Mob *HateList::GetTop(Mob *center)
{
        _ZP(HateList_GetTop);
        Mob* top = NULL;
        sint32 hate = -1;
        
        if (RuleB(Aggro,SmartAggroList)){
                Mob* topClientInRange = NULL;
                sint32 hateClientInRange = -1;
                LinkedListIterator<tHateEntry*> iterator(list);
                iterator.Reset();
                while(iterator.MoreElements())
                {
                tHateEntry *cur = iterator.GetData();
                        sint16 aggroMod = 0;

                        if(!cur){
                                iterator.Advance();
                                continue;
                        }                       

                        if(!cur->ent){
                                iterator.Advance();
                                continue;
                        }

                        if(cur->ent->DivineAura() || cur->ent->IsMezzed()){
                                if(hate == -1)
                                {
                                        top = cur->ent;
                                        hate = 0;
                                }
                                iterator.Advance();
                                continue;
                        }

                        sint32 currentHate = cur->hate;

                        if(cur->ent->IsClient()){
                                
                                if(cur->ent->CastToClient()->IsSitting()){
                                        aggroMod += RuleI(Aggro, SittingAggroMod);
                                }

                                if(center){
                                        if(center->GetTarget() == cur->ent)
                                                aggroMod += RuleI(Aggro, CurrentTargetAggroMod);
                                        if(RuleI(Aggro, MeleeRangeAggroMod) != 0)
                                        {
                                                if(center->CombatRange(cur->ent)){
                                                        aggroMod += RuleI(Aggro, MeleeRangeAggroMod);

                                                        if(currentHate > hateClientInRange || cur->bFrenzy){
                                                                hateClientInRange = currentHate;
                                                                topClientInRange = cur->ent;
                                                        }
                                                }
                                        }
                                }

                        }
                        else{
                                if(center){
                                        if(center->GetTarget() == cur->ent)
                                                aggroMod += RuleI(Aggro, CurrentTargetAggroMod);
                                        if(RuleI(Aggro, MeleeRangeAggroMod) != 0)
                                        {
                                                if(center->CombatRange(cur->ent)){
                                                        aggroMod += RuleI(Aggro, MeleeRangeAggroMod);
                                                }
                                        }
                                }
                        }

                        if(cur->ent->GetMaxHP() != 0 && ((cur->ent->GetHP()*100/cur->ent->GetMaxHP()) < 20)){
                                aggroMod += RuleI(Aggro, CriticallyWoundedAggroMod);
                        }

                        if(aggroMod){
                                currentHate += (currentHate * aggroMod / 100);
                        }

                        if(currentHate > hate || cur->bFrenzy){
                                hate = currentHate;
                                top = cur->ent;
                        }

                        iterator.Advance();
                }

                if(topClientInRange != NULL && top != NULL && !top->IsClient())
                        return topClientInRange;
                else
                        return top;
        }
        else{
                LinkedListIterator<tHateEntry*> iterator(list);
                iterator.Reset();
                while(iterator.MoreElements())
                {
                tHateEntry *cur = iterator.GetData();
                        if(cur->ent != NULL && ((cur->hate > hate) || cur->bFrenzy ))
                        {
                                top = cur->ent;
                                hate = cur->hate;
                        }
                        iterator.Advance();
                }
                return top;
        }
}
This was fixed in R472, and was introduced in R458. So, if your server is running code between those 2 revisions, either try updating and see if it fixes it, or simple adding the iterator as shown in red above should fix it.

I am not aware of any other bugs causing high CPU utilization recently.
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 03:34 PM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3