ArcEmu: Creating Multiple Realms, Saving Space, And Optimizations - ArcEmu

Jump to content

Toggle shoutbox Lastest Announcements

dfighter  : (07 December 2014 - 12:06 PM) Arcemu is in hibernation mode, please read http://arcemu.org/fo...showtopic=26903
dfighter  : (01 January 2013 - 05:56 PM) Arcemu wishes you all a happy new year!
Hasbro  : (12 September 2012 - 10:01 AM) Please excuse our outage from the web! Our web host had a major malfunction!
dfighter  : (01 September 2012 - 04:05 PM) Since the spam bots just don't want to stop, I've enabled admin verification when registering.
dfighter  : (23 January 2012 - 09:56 PM) Please note that from now on you will need to confirm your email on the wiki in order to edit it!
Hasbro  : (31 December 2011 - 12:50 PM) Happy New Years all!
Navid  : (26 December 2011 - 04:09 AM) Merry Christmas !!!!!! Happy holidays all :)
WAmadeus  : (24 December 2011 - 03:54 PM) Merry Christmas to all!
dfighter  : (24 December 2011 - 11:05 AM) The Arcemu team wishes y'all a Merry Christmukkah!
Hasbro  : (05 October 2011 - 12:53 PM) Looking for web designers for upcoming web related project. If you're interested in designing user interfaces contact me
dfighter  : (02 September 2011 - 03:47 PM) So who here wants vehicles in Arcemu? :P http://arcemu.org/fo...showtopic=25440
Hasbro  : (14 August 2011 - 03:25 PM) Join us on irc, grab an irc client and connect to irc.freenode.net join channel #arcemu /server irc.freenode.net:6667 /join #arcemu
jackpoz  : (03 August 2011 - 05:33 AM) to all Lua Engine (old one) users: please check http://arcemu.org/fo...showtopic=25274
Hasbro  : (20 May 2011 - 05:27 PM) Looking for people experienced with CMake configuration and setup! Contact me asap
Hasbro  : (15 May 2011 - 05:03 PM) ArcEmu is recruiting C++ programmers, contact Hasbro if interested.
paroxysm  : (03 May 2011 - 06:26 PM) Updated luabridge gossip example to describe the whole gossip creation process rather than just how to create menu. Gossip tutorial
paroxysm  : (23 April 2011 - 11:35 AM) Lua writers can refer to the Luabridge Tutorials section in the Wiki to learn how to write gossip code correctly.
Hasbro  : (20 April 2011 - 05:22 PM) Thank you for your continuous contribution of bug reports, we are working on them.
Hasbro  : (17 April 2011 - 03:20 AM) Please consider donating to support our bills. Donations can be sent using PayPal to donations@arcemu.org - Thank you for your support.
paroxysm  : (10 April 2011 - 12:43 AM) Refer to the Luabridge Tutorials section in the Wiki to learn the new syntax of luabridge.
Resize Shouts Area

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Creating Multiple Realms, Saving Space, And Optimizations

#1 User is offline   Marforius 

  • Permanantly on leave
  • PipPipPipPip
  • Group: Members
  • Posts: 597
  • Joined: 07-August 08
  • IRC:Marforius
  • Gender:Male
  • Location:Rome
  • Interests:ArcEmulatorius
  • Server OS:Linux

Posted 24 April 2011 - 12:27 AM

Firstly, I would like to say that there is an unimaginable lack of symlink discussion for those with multiple realms. This guide will show you how to do just that, and highlight some other space saving features that are in arcemu, windows, or linux so you don't end up having a ton of slack files; mainly talking about map/vmap files but we can apply this to DBC files as well.

This guide will also cover some... not so space saving ideas that increase memory usage in favor of extreme speed and less wear on your hard drive.

You should set up arcemu for the first time using the wiki's guides -> http://arcemu.org/wiki/

From here we can begin optimizing and saving space.

This guide will have windows / linux alternatives that (hopefully) covers the entire userbase. Mac users should follow the linux version of the below guides or consult google / mac documentation on alternative commands or filesystems.



1.: Creating multiple realms.
Assuming you have one realm presently.
Copy the files to a new subdirectory under the root of your server files, say /Servers/Realm2/
Make sure port 8130 is UNUSED.
Foward port 8130.
Now create an entry in realms.conf
<Realm4 Name = "My New Realm"
	Address = "localhost:8130" 
	Icon = "PVP"
	Population = "1.0"
	TimeZone = "1">

Increase Realm4 if you need to. Create realmlist loops like exist for the default realm in the configuration files so you and your friends can login.
Now open up world.conf and change
<Listen Host = "0.0.0.0"
        WorldServerPort = "8129">

To the new port (8130) you are using.
Start up the realm, it should work fine. This new realm doesn't need a login server running for it, it will use your main login server.



2.: Linking directories to save space.

Directories can be linked to save space in this way:
Program expects file in /Scripts/
File system maintains a link from /../Scripts/
Program reads from /Scripts/ which is actually /../Scripts/ but has no idea that it has just read from another directory.

Getting dirty:
Linking can be done to individual files (WHICH has great importance if you want to optimize for great speed at expense of RAM which will be covered later on in the guide)
Or it can be done to an entire directory path. Which is what I am going to show you how to do.

Firstly; no matter the operating system copy your maps, DBCs, and vmaps out of your server's. Delete the old directories and leave only the top layer directory with the actual files in it.
(The following operations may fail if you don't understand how to delete a folder)
So lets say the server executables are contained in (using windows file delimiters for example): C:\users\me\Desktop\Server\Realm1\
And the DBCs/maps/vmaps etc are now contained in C:\users\me\Desktop\Server\

Windows:

mklink /D C:\users\me\Desktop\Server\Realm1\maps C:\users\me\Desktop\Server\maps

mklink /D C:\users\me\Desktop\Server\Realm1\vmaps C:\users\me\Desktop\Server\vmaps

mklink /D C:\users\me\Desktop\Server\Realm1\dbc C:\users\me\Desktop\Server\dbc

mklink /D C:\users\me\Desktop\Server\Realm1\scripts C:\users\me\Desktop\Server\scripts


Linux: (These may require uppercase letters ex: Maps instead of maps to function.)
ln -s C:/home/me/Desktop/Server/Realm1/bin/maps C:/home/me/Desktop/Server/maps

ln -s C:/home/me/Desktop/Server/Realm1/bin/vmaps C:/home/me/Desktop/Server/vmaps

ln -s C:/home/me/Desktop/Server/Realm1/bin/dbc C:/home/me/Desktop/Server/dbc

ln -s C:/home/me/Desktop/Server/Realm1/bin/scripts C:/home/me/Desktop/Server/scripts


And that's it! Execute all of the above for all of your realms and you should be saving quite a bit of space instead of storing all those gigs of maps and vmaps for each realm.
1. You will have to change the paths above, I cannot do this for you without writing a script for this.
2. Copypaste in linux terminal is ctrl+shift+v ? I think I got that right, in windows right click the window and select paste.



3.: ~ Experimental-Lets-Take-Up-All-Your-Ram-To-Speed-Up-ArcEmu-Because-It-Has-To-Be-Faster guide.. ~


This is dangerous.
You will lose data.
You will reduce the bottlenecks in your system down to being hypertransport, ram frequency, and cpu frequency.

Because of these reasons you will have to do your own research on using "ram filesystems" for your programs. The guide will only cover the basics, and will not be a walk through for users that skim over things hoping for someone else to have done it for them. This guide will not spoon feed you on ways to nuke your files. You have been warned.


This guide will in part show you how to
1. Put all of the files arcemu uses into ram.
2. Lose them all if you have a power failure.
3. Did I mention NUMBER TWO?
4. Make restarts under 4000ms or less. (4000ms with only the safe mysql cache/query tweaks).

Windows:
Step one for windows is finding a nice automated program to do this all for you that saves a image of the files you put in memory so you don't lose everything on restart/powerloss. Downside is I haven't found one that is dynamically expanding (but with more then 10GBs of ram I never find it being used past 3~5GBs) Im using Ramdisk, which you can find by googling. Not that I advocate piracy but you can find a torrent for it easily. Setup should be self explanatory. You need a size that can accommodate all of ArcEmu's files. Symlink them into the ramdisk that you setup. You can also do this to your MySql files, or if you prefer repack it all together "repack" meaning - make a portable MySql and hack it all up into ramfs without symlinks. Tahdah, blazing fast ArcEmu.

RAM is incredibly fast compared to disk, even SSD speeds don't compare to ram filesystems. I find the price of RAM much more economical compared to $200 SSDs(considering its already required to be there for your system to function). $200 of ram = how much SSD space, anyone?


Linux:
As mentioned above, I will not tell you how to lose all of your files. I have not(so far) found a program for mac/linux that uses ramfs as the programs I have found for windows do. The ability to image, backup, and store the files in the ramfs is nonpresent, I found no one posting fstab files with ramfs in them but it is possible to do. You will have to research how to do this, but this will be largely like windows. Move the files you want into a mounted ramfs or symlink. Congratulations you will now lose all of those files on the next restart. But it will be fast, that's what you wanted right? :P

In all reality, all you have to do for the ramfs speed increases is put mysql's data files inside of it. This is extremely dangerous as you will lose all of these files if you don't have a method of backing them up occasionally or at shutdown.



4.: ~ Safe but experimental mysql tweaks ~

windows: C:\Program Files\MySQL\MySQL Server 5.5\my.ini
linux: /etc/my.cnf

key_buffer = 100M
max_allowed_packet = 100M
thread_stack = 50M
thread_cache_size = 40
query_cache_limit = 500M
query_cache_size = 512M

check for duplicate entries, and restart mysql
windows: net stop mysql   - then start
linux: etc/init.d/mysqld restart

I use these values because of how often I restart my realm, they are guesswork and not tweaked AT ALL. They probably waste space, and probably overshoot what would be effective. (But it works).



Any questions or need help? Feel free to post.
Ill be moving all of this to the wiki when its confirmed to work well for others or we can get some more input together to perfect the above tweaks.

Basically, im depending on other people's input on these methods so I can correct them where needed and gain some input before they get posted on the wiki so I don't post something that doesn't work.

This post has been edited by Marforius: 24 April 2011 - 12:53 AM

1

#2 User is offline   dfighter 

  • Titles are overrated
  • PipPipPipPipPipPipPipPipPipPip
  • Group: Administrator
  • Posts: 5,189
  • Joined: 14-June 08
  • IRC:dfighter
  • Gender:Male
  • Server OS:Linux

Posted 24 April 2011 - 01:55 AM

I really doubt anyone is going to have with the default mysql settings with Arcemu ( simply not enough people using it and those who do use it with small number of players ).
If they hit any kind of slowdown that will be because they use a VPS or something similar.
Also a ramdisk is not at all a good solution for database speedup. If you really want to speed it up, then learn how to do it right, dive into the documentation of mysql ( there is a reason why it has 4000+ pages manual ).
Hmm I wonder where did you get those mysql settings? Are they like random?
"The demand for free goods is infinite."
0

#3 User is offline   Marforius 

  • Permanantly on leave
  • PipPipPipPip
  • Group: Members
  • Posts: 597
  • Joined: 07-August 08
  • IRC:Marforius
  • Gender:Male
  • Location:Rome
  • Interests:ArcEmulatorius
  • Server OS:Linux

Posted 24 April 2011 - 09:08 PM

View Postdfighter, on 24 April 2011 - 01:55 AM, said:

Hmm I wonder where did you get those mysql settings? Are they like random?


Reading my.ini's documentation. So far the only thing I see viable for moving to the wiki is the link/multi-realm section of this anyhow.
0

#4 User is offline   dfighter 

  • Titles are overrated
  • PipPipPipPipPipPipPipPipPipPip
  • Group: Administrator
  • Posts: 5,189
  • Joined: 14-June 08
  • IRC:dfighter
  • Gender:Male
  • Server OS:Linux

Posted 24 April 2011 - 09:34 PM

View PostMarforius, on 24 April 2011 - 09:08 PM, said:

Reading my.ini's documentation. So far the only thing I see viable for moving to the wiki is the link/multi-realm section of this anyhow.

It's already documented on mysql's site, so what's the point?
We're Arcemu not mysql :P
"The demand for free goods is infinite."
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users