EQ2 and Memory Usage Question

General support forum. If you require assistance and your problem doesnt fall in any of the other categories, this is the forum for you!

Moderator: Team Members

Forum rules
READ THE FORUM STICKY THREADS BEFORE ASKING FOR HELP!
Most information can be found there, and if not, the posts will help you determine the information required to get assistance from the development team.
Incomplete Help Requests will be locked or deleted.
CliveEvenstar
Posts: 47
Joined: Thu Feb 04, 2010 12:09 pm

EQ2 and Memory Usage Question

Post by CliveEvenstar » Mon Feb 08, 2010 9:29 am

On average about how much memory should the EQ2 client be using? Running around on TessEQ2 I noticed lag spikes that I wasn't getting yesterday, so opening Windows Task Manager I wanted to check the memory usage. As it stands EQ2 is using:
805,566 K and around 60 CPU
I believe the actual eq2 client only uses around maybe 300,000 - 500,000 K, I could be wrong, anyone else placed at about 800 mbs of ram usage?

-- Clive

User avatar
Arremis
Retired
Posts: 388
Joined: Sun Sep 02, 2007 10:11 am
Location: Memphis, TN

Re: EQ2 and Memory Usage Question

Post by Arremis » Mon Feb 08, 2010 5:22 pm

There are too many factors to list, but anything you see on the screen can cause a spike in memory and cpu usage. Other clients connected, graphics heavy features turned on, mobs spawning and despawning, mobs casting spells, UI windows updating, things running in the background, scheduled tasks running, automatic updates, the list is endless. The client itself was built several years ago on the concept that single core processors would reach beyond 10GHz, however, years down the line, it was too late when Intel decided to make smaller, dual-core processors instead - the worst possible thing that could have happened to the EQ2 engine. For years now, people have been asking SoE to rebuild the engine from scratch, and they haven't budged yet. They have done some tweaking to get some of the load onto the GPU, but honestly, only a full engine overhaul is going to get it up to specs with the latest competition.
I am the UI Master...there is no charge for my awesomeness.

User avatar
John Adams
Retired
Posts: 9684
Joined: Thu Jul 26, 2007 6:27 am
EQ2Emu Server: EQ2Emulator Test Center
Characters: John
Location: Arizona
Contact:

Re: EQ2 and Memory Usage Question

Post by John Adams » Mon Feb 08, 2010 6:31 pm

EQ2 has got some pretty kick ass graphics and effects, for a 5+ year old game. At least it's not Disney Cartoons on Acid (WoW). And Vanguard, with it's "Next Generation" graphics is such a piece of shit to run, it's recommended to use a ramdisk for the cache files. Seriously?

I'll take EQ2 gfx and engine anyday.

Clive, our memory management is nowhere near what SOE's is, though we have come a long way since the beginning. As Arremis said, many factors contribute to memory usage - including things you cannot see. How we are spawning zones, maybe too many NPCs in an area, inefficient movement scripts, and of course... pretty graphics :)

CliveEvenstar
Posts: 47
Joined: Thu Feb 04, 2010 12:09 pm

Re: EQ2 and Memory Usage Question

Post by CliveEvenstar » Mon Feb 08, 2010 10:03 pm

Yes, pretty graphics I agree. I remember beta testing EQ2 when I was still playing EQ and was AMAZED at the world I was running through. Course I did the same thing when I beta tested Vanguard, that's not to say VG is awful, and it could be so much better, but it has a lack of a development team to do much.

I often wondered on the lua scripting. Wouldn't it be more efficient to hard code some the of things lua scripts are doing? Aka abilities (skills/spells) would run faster hard-coded versus calling a script for each use? I could be wrong but wouldn't there be differences in speeds from say 100 players using skills/spells that are hard-coded versus 100 players using skills/spells that have to execute a script?

-- Clive

User avatar
Scatman
Retired
Posts: 1688
Joined: Wed Apr 16, 2008 5:44 am
EQ2Emu Server: Scatman's Word
Characters: Scatman
Location: New Jersey

Re: EQ2 and Memory Usage Question

Post by Scatman » Mon Feb 08, 2010 10:44 pm

Hard coding would be a lot faster but you're talking about hard coding 5000+ abilities? :P No thanks. Also, there wouldn't be any customization if it were all hard coded which wouldn't be fun at all!

CliveEvenstar
Posts: 47
Joined: Thu Feb 04, 2010 12:09 pm

Re: EQ2 and Memory Usage Question

Post by CliveEvenstar » Mon Feb 08, 2010 10:48 pm

True true, I'm just thinking on the long term usage of lua vs hard-code. Because EQ2EMU will get to a point where servers well have up to 100 if not more, and the stress tests of that many invoking lua scripts at the same time or various times could be a huge resource strain, at least I would think so.

And 5,000+ doesn't seem *so* bad.... Considering you would still have to write 5,000+ lua scripts for each ability right? :P

-- Clive

User avatar
Scatman
Retired
Posts: 1688
Joined: Wed Apr 16, 2008 5:44 am
EQ2Emu Server: Scatman's Word
Characters: Scatman
Location: New Jersey

Re: EQ2 and Memory Usage Question

Post by Scatman » Mon Feb 08, 2010 10:53 pm

CliveEvenstar wrote:And 5,000+ doesn't seem *so* bad.... Considering you would still have to write 5,000+ lua scripts for each ability right? :P
No. One script can and should be able to handle a type of spell. So a Taunt.lua file should be able to able every taunt spell in the game unless there's a bunch of extra stuff (which could be handeled using if statements and adding the extra stuff based on what spell it is).

CliveEvenstar
Posts: 47
Joined: Thu Feb 04, 2010 12:09 pm

Re: EQ2 and Memory Usage Question

Post by CliveEvenstar » Mon Feb 08, 2010 10:56 pm

Ah so basically taunt.lua could handle taunt plus all the upgrades to it with if statement checks. That would seem to make things easier. Question regarding skills atm, are you guys trying to figure out what the correct animations are for skill uses? I know I've tried each skill and so far the only one that looks correct is pathfinding.

User avatar
Scatman
Retired
Posts: 1688
Joined: Wed Apr 16, 2008 5:44 am
EQ2Emu Server: Scatman's Word
Characters: Scatman
Location: New Jersey

Re: EQ2 and Memory Usage Question

Post by Scatman » Mon Feb 08, 2010 10:59 pm

CliveEvenstar wrote:Ah so basically taunt.lua could handle taunt plus all the upgrades to it with if statement checks. That would seem to make things easier.
Exactly
CliveEvenstar wrote:Question regarding skills atm, are you guys trying to figure out what the correct animations are for skill uses? I know I've tried each skill and so far the only one that looks correct is pathfinding.
Yep, Zcoretri is doing a lot of the spell stuff. We just got a lot more support for spells (server side) this past week so the spells will start pouring in eventually.

User avatar
Zcoretri
Team Member
Posts: 1642
Joined: Fri Jul 27, 2007 12:55 pm
Location: SoCal

Re: EQ2 and Memory Usage Question

Post by Zcoretri » Mon Feb 08, 2010 11:01 pm

CliveEvenstar wrote:Ah so basically taunt.lua could handle taunt plus all the upgrades to it with if statement checks. That would seem to make things easier. Question regarding skills atm, are you guys trying to figure out what the correct animations are for skill uses? I know I've tried each skill and so far the only one that looks correct is pathfinding.
How did you try each skill? or you mean spell/ca? In either case, spells/ca's are not 100% done.
Hopefully soon I can have some focus testing on some classes....stayed tuned :mrgreen:

CliveEvenstar
Posts: 47
Joined: Thu Feb 04, 2010 12:09 pm

Re: EQ2 and Memory Usage Question

Post by CliveEvenstar » Mon Feb 08, 2010 11:03 pm

Kk, just let me know if there's anything I can do to help, I got nothing but time on my hands. Also, as it stands for lua script upgrades for abilities is that in yet, example:

Code: Select all

if ability->skill("taunt")
  do this
else if  ability->skill("taunt_adept")
  do this
else if ability->skill("taunt_master")
  do this
Now I know that's not the correct syntax at all, but it's easy to look at and understand what I mean. Is that flexibility for lua scripts to handle yet? or is that something being waited on server side? Cause if that is in I might be able to help flush out some abilities for you guys as it really is a lot of repeated usage with just upgrades to each statement.

-- Clive

User avatar
Zcoretri
Team Member
Posts: 1642
Joined: Fri Jul 27, 2007 12:55 pm
Location: SoCal

Re: EQ2 and Memory Usage Question

Post by Zcoretri » Mon Feb 08, 2010 11:28 pm

looks kinda like this

Code: Select all

function cast(Caster, Target, MinTaunt, MaxTaunt)
    -- Taunt component
    if MaxTaunt ~= nil and MinTaunt < MaxTaunt then
        hateAmount = math.random(MinTaunt, MaxTaunt)
        AddHate(Caster, Target, hateAmount)
    else
        AddHate(Caster, Target, MinTaunt)
    end
end
MinTaunt and MaxTaunt values come from a table in the DB and get passed in based on what tier the spell/ca is.

User avatar
Scatman
Retired
Posts: 1688
Joined: Wed Apr 16, 2008 5:44 am
EQ2Emu Server: Scatman's Word
Characters: Scatman
Location: New Jersey

Re: EQ2 and Memory Usage Question

Post by Scatman » Mon Feb 08, 2010 11:39 pm

If you wanted to see which spell it was, you'd go to the spell_data table and pass in the name of the spell along with the mindamage and maxdamage values. That way you could do:

Code: Select all

function cast(Caster, Target, SpellName, Damage)
   if SpellName == "Taunt" then
      -- taunt only
   elseif SpellName == "Taunt and Damage" then
      -- taunt
      -- spell damage
   end
end

User avatar
John Adams
Retired
Posts: 9684
Joined: Thu Jul 26, 2007 6:27 am
EQ2Emu Server: EQ2Emulator Test Center
Characters: John
Location: Arizona
Contact:

Re: EQ2 and Memory Usage Question

Post by John Adams » Tue Feb 09, 2010 5:33 am

Yeah, no offense Clive, but we have been building data for 2 years now (sloowwwwllly) and we know exactly how scripts will work in nearly every scenario. Re-inventing how it's done now will not happen. Much of LUA scripting is documented on these forums and the Wiki, so feel inspired to search for LUA or Script to see what we have already accomplished.

Scripts are not run like DOS Bat files. They are loaded at world/zone startup, and utilized when needed from memory. Can't get much faster than that.


(i can't believe I just defended LUA)

CliveEvenstar
Posts: 47
Joined: Thu Feb 04, 2010 12:09 pm

Re: EQ2 and Memory Usage Question

Post by CliveEvenstar » Tue Feb 09, 2010 7:09 am

@Scat - That looks and sounds pretty easy!

@John - No offense takin! Was mostly curious as I know from working with other game engines that use a scripting language they often cause lag issues depending on the amount of usage. The wiki has references to lua? I'll have to go check that out! Also, when using lua, do I need to install anything onto my pc to use it? Example, to program in C I need to use a C development program aka VC++ or Borlands, do I need to do the same with lua?

-- Clive

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests