BetterDeadThanZed

[SOLVED] Memory pagefault

9 posts in this topic

I use marma.io to monitor my server's performance and I noticed the "Memory Pagefault" graph shows anywhere between 90 and 200. In the 3 hour graph, I see spikes that can go all the way up to 2000. I don't know anything about Memory Pagefaults. Can someone with a working technical knowledge of this please explain to me what this is and how it affects my server? Here's a screenshot of the last 3 hours:

pagefault.JPG

Share this post


Link to post
Share on other sites

You really need to so the graph for memory aswell as memory pagefaults to get an idea what is going on.
Most of the spikes will just be arma requesting more memory.

But in generally set your server max memory to 3000 i.e  -maxmem=3000  don't go higher than 3.2GB otherwise you will eventually randomly crash.
By default it is 2GB and arma will try to release memory at around 80% of max memory. 

Share this post


Link to post
Share on other sites
Advertisement

Hello Zed,

 

In simple terms:

 

It is sorta like going to a restaurant.  You call ahead and reserve a spot for you and a date.  The place confirms this reservation.  That night, you show up with you and your date, no issues.

 

BUT, what would happen if you showed up with you, your date, and 10 friends?  The restaurant would have an 'issue' with this and your 10 friends would not be seated.

 

This is what is going on in UNIX/Linux and Windows.  A program tells the OS that it needs 20 mb of RAM.  The OS  confirms and reserves this memory for that program.

Now, during the course of operation, this program tries to use 30 mb of RAM, the OS would create a 'memory page fault'.  The program has 'stepped over' an imaginary line drawn by the OS.

Every program operates on its own 'page', you could also call it:  'its own backyard', 'its own room', etc..  The program is trying to use another programs memory or memory that is unallocated.  The OS will not permit this.  If it did, most likely, the OS would crash or some other program would crash.

 

What is causing it?  Who knows.  ANY program can cause this.  Even the OS itself can cause this.  It could be a poorly written program, corrupt program, bad RAM, or even a bad HDD.  There are many things, software and/or hardware, that can cause this error.

 

Personally, ME, if everything is running fine, forget about it.  If you are concerned, then you will have to start at the beginning and add one thing at a time and check your reports.  Unless you have some sort of logging utils which would show you the 'bad program'.

 

Good luck to ya!

:)

 

 

Share this post


Link to post
Share on other sites

Err the above analogue starts off well and then goes completely off the deep end.

https://en.wikipedia.org/wiki/Page_fault

Page Fault is basically the memory requested isn't ready for the program yet. It has nothing todo with badly written program ;)
So you will see page faults as arma memory usage increases == normal. 

There are 2 kinds of Page Faults soft + hard, both are counted towards to mARMA Metric logging.
Trying to monitor Hard Page Faults from within a process in windows as non-admin user == complete nightmare.
In Linux it couldn't be easier todo.


Anyway setting max memory & messing around with allocators are really the only way to real ways to effect your memory faults.
Just set the maxMem to 3 gb and it should reduce the number of page faults you are seeing
 

1 person likes this

Share this post


Link to post
Share on other sites

I can't set any of that because the server is hosted. I don't have the community that is willing to donate enough monthly for a dedicated box. :(

Thank you for the answers.

Share this post


Link to post
Share on other sites

Hello Torndeco,

Yes, a poorly written program can cause this error.  Examples of such is a poorly written memory 'in-use' calculations, or using out-dated methods to obtain memory in use.  Or just ignoring the OS completely and attempting to access the memory as a non-virtual program used to be able to do, such as running old DOS programs under Windows.  Or (though never tried) the possibility of attempting to switch from 'virtual mode' to 'real mode' might cause this error.

 

There are even some 'game hacks' and viruses/malware that will also generate this error too due to poor programming.

See:  https://www.google.com/#q="page+fault"+malware OR  https://www.google.com/#q="page+fault"+virus

 

Or someone writing their own MMU (memory management unit) program.

 

You still can see this is an issue by having to use such programs as DOS4G for old DOS programs.

See:  ftp://ftp.tenberry.com/ftp/pub/4gfaq.txt

 

You can even run programs which will cause a page fault, thus it can happen by poor programming if people incorporated these programming 'steps' in their code.

See:  http://unix.stackexchange.com/questions/188170/generate-major-page-faults

 

I did not say that is WAS a poorly written program, rather, it is POSSIBLE.  That is a big difference and software CAN cause it as shown above.

 

Bottom line, if nothing is 'blowing up', I would just ignore it.

 

"If it aint broke, don't fix it!"

 

:)

 

Share this post


Link to post
Share on other sites

Its just basically poorly written memory management or forcing allocations till you trigger a soft/hard pagefault.

You example gives people the impression it was program messing up, or accessing another program memory or bad ram.
Basically all doom and gloom, you might scare a user into thinking something bad was happening. Especially when you call it an error in bold text.
Anyway that graph is soft & hard pagefaults.

Anyway like i said 90+% of the time that graph is arma hitting 80% of its max memory
At which point arma fights itself with deallocating memory & allocating memory.
Simple tweak of maxMem will help prevent this scenario from occurring.

1 person likes this

Share this post


Link to post
Share on other sites

I stated in bold that anything, hardware or software can cause this error and this is the truth - period.

 

I gave him the whole truth, not 'bits and pieces' of what could be causing it - period.

 

I am a programmer with 40+ years under my belt, ever wonder why I use a Z80 CPU icon as my pic?  That is what I started with assembly language under CP/M.  I am also a Digital Technician, able to board level repair and engineer product for 30+ years.

 

I am not a 'noob'.  I gave him the complete truth.

And the complete truth is many things can cause it - hardware and software.

THAT is the truth.  I am not going to assume things.  He deserves a straight and complete answer and he received one from me.

 

And besides 'Mr. Quick To Answer', you FAILED at reading his post.

 

And I quote: "...I don't know anything about Memory Pagefaults. Can someone with a working technical knowledge of this please explain to me what this is..."

He asked for an EXPLANATION of what they were.  You forgot that little bit of info didn't you?

 

Before you start accusing someone, I would advise you to 'get your facts straight' first!

 

Share this post


Link to post
Share on other sites
Advertisement
Guest
This topic is now closed to further replies.

  • Recently Browsing   0 members

    No registered users viewing this page.