Ninja Soft Page Faults - NinjaTrader Programming | futures io social day trading
futures io futures trading

Ninja Soft Page Faults
Updated: Views / Replies:684 / 3
Created: by sniffy Attachments:0

Welcome to futures io.

(If you already have an account, login at the top of the page)

futures io is the largest futures trading community on the planet, with over 90,000 members. At futures io, our goal has always been and always will be to create a friendly, positive, forward-thinking community where members can openly share and discuss everything the world of trading has to offer. The community is one of the friendliest you will find on any subject, with members going out of their way to help others. Some of the primary differences between futures io and other trading sites revolve around the standards of our community. Those standards include a code of conduct for our members, as well as extremely high standards that govern which partners we do business with, and which products or services we recommend to our members.

At futures io, our focus is on quality education. No hype, gimmicks, or secret sauce. The truth is: trading is hard. To succeed, you need to surround yourself with the right support system, educational content, and trading mentors Ė all of which you can find on futures io, utilizing our social trading environment.

With futures io, you can find honest trading reviews on brokers, trading rooms, indicator packages, trading strategies, and much more. Our trading review process is highly moderated to ensure that only genuine users are allowed, so you donít need to worry about fake reviews.

We are fundamentally different than most other trading sites:
  • We are here to help. Just let us know what you need.
  • We work extremely hard to keep things positive in our community.
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts.
  • We firmly believe in and encourage sharing. The holy grail is within you, we can help you find it.
  • We expect our members to participate and become a part of the community. Help yourself by helping others.

You'll need to register in order to view the content of the threads and start contributing to our community.  It's free and simple.

-- Big Mike, Site Administrator

Thread Tools Search this Thread

Ninja Soft Page Faults

  #1 (permalink)
Trading Apprentice
Futures Experience: Master
Platform: ninja
Posts: 7 since Oct 2009
Thanks: 0 given, 5 received

Ninja Soft Page Faults

Does anyone have millions and millions of soft page faults when running Ninja ?

I have gazillions of them.

Reply With Quote
  #2 (permalink)
Quick Summary
Quick Summary Post

Quick Summary is created and edited by users like you... Add FAQ's, Links and other Relevant Information by clicking the edit button in the lower right hand corner of this message.

  #3 (permalink)
Elite Member
Birmingham UK
Futures Experience: Intermediate
Platform: NinjaTrader
Broker/Data: IG/eSignal
Favorite Futures: Dax
ratfink's Avatar
Posts: 3,336 since Dec 2012
Thanks: 11,276 given, 7,090 received

sniffy View Post
Does anyone have millions and millions of soft page faults when running Ninja ?

I have gazillions of them.

Depends more on the working set size and the PF Delta (i.e. rate), if the baseline PF Delta is in the 2-5k range during normal use for a 500Mb footprint I'd say that's very normal. PF Delta on mine will jump to 12-15k when I switch workspaces but its still instant.

All OO type software programs tend to destroy low-level caches, hence the desire for heaps of DDR3. Not really a worry given the level of functionality we get in exchange, only a real worry if you get into hard page fault territory, then you have a system dog on your hands...

Travel Well
Reply With Quote
The following user says Thank You to ratfink for this post:
  #4 (permalink)
Trading Apprentice
Futures Experience: Master
Platform: ninja
Posts: 7 since Oct 2009
Thanks: 0 given, 5 received

Here's the skinny

So for all those thousands who are secretly dying to know ...

The background is that I have a spawned Form that creates price bars/other objects and is drawn and updated by a multi-layered graphics process that uses Bitmaps for buffers. This gives me double buffering with the drawing taking place in memory, then the painting of only those elements that have changed taking place in the Paint event handler.

However, I had left in place in my Form constructor, the setStyle instruction to use .Net double buffering. (I think the default for Forms is double buffering). So I changed that to not use double buffering ( I was already doing it manually through the Bitmap buffer after all).

Here is my complete setStyle list:

this.DoubleBuffered = false;
this.SetStyle(ControlStyles.SupportsTransparentBackColor, true);
this.SetStyle(ControlStyles.AllPaintingInWmPaint, true);
this.SetStyle(ControlStyles.OptimizedDoubleBuffer, false);
this.SetStyle(ControlStyles.UserPaint, true);
this.SetStyle(ControlStyles.ResizeRedraw, true);

Getting rid of the .Net double buffering reduced my soft page faults PFDelta from a background level of circa 450 with quite frequent peaks of 6/7 K and even up to 10-20K, by more than half. By double buffering x double buffering I presume that I was probably setting up a nice chain of unnecessary page faults.

Has there been any noticeable performance degradation ? None whatsover. The Bitmap double buffering and other anti-flicker options in the setStyles are clearly doing their job.

Not that there was any apparent visual issue before this change other than the unsettling number of soft page faults. However when you are waiting for confirmation of a fill or whatever, every little edge can obviously be very valuable.

In the process of trying to track down the reasons for these page faults I also noticed that I was allocating the Bitmaps in a way that didn't make sense, and sorting this out seems to have reduced the page fault regime further, and sorted a very small Dispose issue.

I also tried different options in the Bitmap allocation statement. I found that there was no apparent effect either on perceived graphics performance, or on the page fault annoyance. I currently use this:

Bitmap newBitmap5 = new Bitmap(rightPanel.Width, rightPanel.Height, PixelFormat.Format32bppPArgb);

So where am I now?

I have a baseline PFDelta of about 300 with peaks/spikes up to about 1K. Perceived graphics performance is still excellent with not a sign of flicker. Reducing the number of soft page faults was not the objective, gaining an understanding of why they seemed so high was.

Last edited by sniffy; February 23rd, 2013 at 04:29 PM.
Reply With Quote


futures io > > > > > Ninja Soft Page Faults

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Upcoming Webinars and Events (4:30PM ET unless noted)

Jigsaw Trading: TBA

Elite only

FuturesTrader71: TBA

Elite only

NinjaTrader: TBA

Jan 18

RandBots: TBA

Jan 23

GFF Brokers & CME Group: Futures & Bitcoin

Elite only

Adam Grimes: TBA

Elite only

Ran Aroussi: TBA

Elite only

Similar Threads
Thread Thread Starter Forum Replies Last Post
US Economy Hits a Soft Patch, But Some See It as 'Temporary' Quick Summary News and Current Events 0 May 30th, 2011 02:50 PM
Apple Macs now seen as a 'soft target' for spreading viruses kbit Tech Support 0 May 23rd, 2011 07:10 PM
Tuesday: Stocks Start May Soft; Look to Auto Sales Quick Summary News and Current Events 0 May 3rd, 2011 12:20 AM
Dollar Broadly Lower After Soft US Economic Reports Quick Summary News and Current Events 0 April 28th, 2011 12:50 PM
No Safe Assets In 'Soft & Fluffy' Europe? Quick Summary News and Current Events 0 December 10th, 2010 05:40 AM

All times are GMT -4. The time now is 04:35 PM.

Copyright © 2017 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, +507 833-9432,
All information is for educational use only and is not investment advice.
There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
no new posts
Page generated 2017-12-13 in 0.08 seconds with 19 queries on phoenix via your IP