Running multiple instances of program slow?

Started by Disastorm, March 28, 2012, 12:30:27 PM

Previous topic - Next topic

Disastorm

Hello, whenever I run multiple instances of my program it runs insanely slow like less than 1fps.  When running a single instance its perfectly fine.  Do you know why this might happen?

EgonOlsen

Which hardware, OS, drivers, memory size etc...

Disastorm

#2
I have windows 7 64-bit, 8GB RAM, AMD Phenom II X6 1055T, Radeon HD 5870.  I have most recent drivers for my radeon but I remember that jpct always did this for me, except it used to be a little faster but still super slow, but recently its like less than 1 fps with 2 instances of my program open.

EgonOlsen

#3
The engine is not responsible for this. Each instance lives in it's own VM and has no direct influence on any other instance. I'm also using Windows 7 64bit and a Radeon HD 5870 with the latest drivers and i can run four instances of the fps-example at a time and they all run @ around 2000fps. I've no idea what's wrong with your setup!?

Disastorm

Well is it possible that it has something to do with one of the configuration options in JPCT.  Perhaps if I enable or disable something it will fix this? I'll post my actual program up here soon so you can see if you experience the same issue with it. Also Ill check out the Fps example and see how many I can run.

Disastorm

It looks like its the Shadow Helper. If I lower the maxSize the lag decreases (with multiple instances).  Without the ShadowHelper the speed only decreases a little bit.

Here is a link to a rar with both the version with shadowhelper(using 8192 maxValue) and version without.  They both suffer speed decrease with multiple instances, but one is more severe than the other.  Just run Project3D.jar .


http://disastorm.com/files/ProjectBuilds.rar

EgonOlsen

No wonder....8192 * 8192 is...insane. You are simply running out offen video memory. A shadow map of that size requires half a gig of video memory. Two instances...and you have filled your video memory with that data alone. Reduce that size and it will run much better.

Disastorm

is shadow map not intended to be used for big areas or games, because even at like 2048 it looks a bit pixellated?

EgonOlsen

Then try 4096 instead. When using basic shadow mapping, you'll always have a slightly pixelated look depending on the distance and the fov of the light source.

Disastorm

#9
Ok thanks.  I'm just trying to figure out exactly how shadow map should or can be used.  If I wanted each character to have a shadow for example, would it be best to have one projector source or is it possible to actually have a projector on top of each character and then have the shadowmap switch to each one and render them all in the main loop? Can you use multiple projectors or shadowHelpers?  Or is the best thing to do to have a single shadowHelper that follows relative to the camera.

EgonOlsen

Multiple shadow helpes won't work. Just use one and make it follow the camera.