Go Back   EQEmulator Home > EQEmulator Forums > Development > Development::Development

Development::Development Forum for development topics and for those interested in EQEMu development. (Not a support forum)

Reply
 
Thread Tools Display Modes
  #1  
Old 02-28-2013, 04:09 AM
Chrono
Sarnak
 
Join Date: Apr 2002
Posts: 36
Default New Shared Memory

With the latest overhaul to shared memory in the code, I was just curious as to what advantages it has over the last system? As it seems like a huge change.
Reply With Quote
  #2  
Old 02-28-2013, 04:33 AM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

I imagine KLS will chime in on this thread, but here is the changelog update about it:

Code:
== 02/27/2013 ==
KLS: Changed how shared memory works:
    Instead of System V/windows pagefile shared memory we now have shared memory that's backed by the filesystem.
    What that means is basically instead of EMuSharedMem(shared library) we now have shared_memory(executable), 
    shared memory will be persistent between runs until you delete or reload it using the shared_memory executable.
    
    STEPS FOR PEOPLE WHO CAN'T BE BOTHERED TO FIGURE IT OUT:
        1) Create a directory in the place you run world/zone named shared and make sure files can write there.
        2) Run the shared_memory executable from the same place you run world/zone 
        (it's basically doing the loading we would do on startup so will take a moment).
        3) Run world/zone/whatever
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!

Last edited by KLS; 02-28-2013 at 03:54 PM.. Reason: God wtb word wrap for code blocks.
Reply With Quote
  #3  
Old 02-28-2013, 05:33 AM
KLS
Administrator
 
Join Date: Sep 2006
Posts: 1,348
Default

The biggest advantage is to people like me who have to restart zone over and over and over while developing incrementally. Which took me about a minute each time (guh). Now I only need to process the data when it changes. Which means cold zone boot ups go from about 60 seconds to about 3 seconds.

A secondary reason (and the main motivator for me) was to make it easier to put things into shared memory if we need to. It was such an utter pain before that no one bothered to even try. It's pretty easy now though.

And of course never having to run cleanipc ever again is a nice perk.
Reply With Quote
  #4  
Old 02-28-2013, 08:41 AM
Drajor's Avatar
Drajor
Developer
 
Join Date: Nov 2012
Location: Halas
Posts: 355
Default

KLS will this have an impact on the physical memory footprint, or the speed of fetching data from shared memory? I am interested in the physical memory because earlier designs of my server had millions of items and I started to run out of memory at about 900,000 items. The design has changed to use fewer items now.
__________________
Drajor regards you indifferently -- what would you like your tombstone to say?
Reply With Quote
  #5  
Old 02-28-2013, 03:53 PM
KLS
Administrator
 
Join Date: Sep 2006
Posts: 1,348
Default

It does have an impact on the memory footprint of items. Before we had a system where if you had x items with y being the max item id you allowed(set by a compile option), in that system you stored y items. The default being 300000.

Now you store x items with z number of offsets (4 bytes each), where z is the actual max item id.

So people who have tightly packed item ids will see memory increase slightly, most people will see a reduction in memory. People using PEQ's DB for instance will see items use about 1/3 the memory if they had been using the default settings.
Reply With Quote
  #6  
Old 03-01-2013, 05:46 AM
Drajor's Avatar
Drajor
Developer
 
Join Date: Nov 2012
Location: Halas
Posts: 355
Default

Interesting! I am going to have to play around with this because on my server I allocate memory for items differently. Due how I create content I have tightly packed IDs...
__________________
Drajor regards you indifferently -- what would you like your tombstone to say?
Reply With Quote
  #7  
Old 03-03-2013, 04:21 PM
KingMort
Banned
 
Join Date: Sep 2006
Posts: 841
Default

Interesting changes I like it thank you. I had no clue what was going on however I had to sort of search the forums to figure out why my server wouldn't start after updating to latest build (after figuring out how to do so)

You guys rock though Keep up the good work!

Morty
Reply With Quote
  #8  
Old 04-14-2013, 10:33 AM
Irreverent
The Solo Server
 
Join Date: May 2007
Posts: 416
Default

Is there a way to take loot tables out of it? Seemed so much easier/faster to have them dynamically pulled from the database when debugging/changing them.

I can understand items
__________________
OP of Irreverent Server (The Solo Server)
Our Forums
Reply With Quote
  #9  
Old 04-14-2013, 03:14 PM
demonstar55
Demi-God
 
Join Date: Apr 2008
Location: MA
Posts: 1,165
Default

Code:
$ ./shared_memory loot
Will just reload the loot tables.
Reply With Quote
Reply

Thread Tools
Display Modes

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 08:14 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