Why must I restart VMS to get faster rendering

ritsmer wrote on 6/1/2008, 1:11 AM
I have written about this before. I also have submitted 2 support questions to Sony - but it seems that I am that bad explaining the problem (if any) that I get no clear answers :-))

I make a simple VMS project: Only one single .jpg picture approx. 3 Mpix on the timeline. Duration 4 seconds. No Fx No nothing else.
I do "Make movie" (to vmw 1360x768 25 Fps) and it takes 7 seconds to finish.
Then I do "Make movie" again, and now , the same rendering takes 22 seconds!!???

Then I close VMS and start it again with the same project.
I do "Make Movie" and it takes 7 seconds.
I do "Make movie" again and now it again takes 22 seconds.

Found this problem in VMS 8.0 last version and also in Full Vegas 7 last version (I do not have Full Vegas 8 yet) and on 2 different PCs(both multiprocessor machines - and both running XP SP2++).

I would like to indentify the problem so that the developers in Madison can improve Vegas on this point - to me it looks like something is not properly reset after first "Make movie" after VMS is started (if it is not an error in both my PC's) - so:

Could some of you please make the same example with just one 2 to 4 Mpix jpg picture and post the rendering times for the first render after VMS is started and for the following renders??

Comments

OhMyGosh wrote on 6/1/2008, 10:08 PM
Ok, you have me confused (don't feel bad, that's easy to do). ;)
<I do "Make movie" (to vmw 1360x768 25 Fps) >
I take it this is PAL, and 'vmw' is supposed to be 'wmv'? And where are you finding the 1360X768 template? Thanks. Cin
ritsmer wrote on 6/1/2008, 11:46 PM
Hi OhMy

Sorry for beeing unprecise.

You can do the test with any template - i.e. "5 Mbps HD 720-25p Video" and output to wmv takes on my PC 7 seconds for the first rendering and 23 seconds !!! for the second and following.

The problem I see is that it takes few seconds for the first rendering after VMSP (and also for Vegas 7) is started and up to 3 times longer !!! for the second and following renderings.
OhMyGosh wrote on 6/2/2008, 10:20 PM
Hi ritsmer,
You are right, I just don't know why :O It takes 19 seconds the first time, and 32 seconds the second time. This is where I wish the Forum Administrator would step in and help us better understand these sort of things. We could speculate from now till forever, and never really be sure, where they could clear it up in a heart beat :/ Well, maybe one of the gurus will take a stab at explaining it, but in the mean time, if I need to render a large project more than once, I will think about closing and reopening the program. Thanks for sharing. Cin
reneg wrote on 6/3/2008, 8:59 AM
The difference in render speeds could be attributed to other factors such as the operating system paging file. My render and re-render speeds are consistent for the example given.

However, if the operating system has swapped some of the virtual memory to the page file on a disk drive, this might possibly explain why render time increasing and CPU utilization drops. The program is running as fast as it can, but the operating system has to make sure that all the virtual memory the program needs is in real, physical memory. Accessing disk drives is much slower than accessing memory. This is speculation on my part.
Himanshu wrote on 6/3/2008, 5:48 PM
reneg:

Your system specs are not online, so let me ask, how much RAM do you have? I'm pretty sure I participated in testing when ritsmer posted the original message, and I think I was able to duplicate a small increase in time, but not much. I have 1.5GB RAM with a P4 2.8GHz (HT).

ristmer:

I'm not sure if this is worth following up unless in a larger project (say 30-60 minutes) the time really shows as much difference between the first and second renders as with the small project. With a short render variations seem large but may not be meaningful. What happens when you render a larger project twice?
reneg wrote on 6/3/2008, 8:24 PM
I'm still new to the forums here, so I haven't updated my profile yet. I have 4GB of RAM.

I was just trying to offer up a potential explanation for the discrepancy. Without more data, I don't think we can tell if it's an issue or just normal behavoir.

ritsmer wrote on 6/3/2008, 10:58 PM
Hi Himanshu

In larger projects I see, say, 1 hour rendering time the first time and way over 2 hours the following times. As soon as I restart VMS again 1 hour...

As many people did not believe this and told me to use fewer FX etc (which, btw can not give this effect :-)) I cooked the problem down to ONE single jpg picture - where the ratio 7 to 23 seconds clearly shows the problem.

To reneg: I have a double Xeon Quad machine with 3 of the fastest disks available and Windows and programs are on one physical disk, paging file on another and the media on a third. I can easily run the test having no pagefile at all (have tried - and also on more PCs)
Of course my PCs are defragged every 2 weeks and the registry is cleaned and the pagefile lies in one segment only and.. and...

So for the time beeing we have:

1 user who also has the differences in rendering time and
1 user who has no difference.

I call for more users to try the little test, please.
Its easy: startup VMS - put 1 single 2-3Mpix jpeg on the timeline (stretch it to 5 seconds) - render to wmv with template 5 MBps 720-25 and clock the render time. Then render again (without restarting VMS) and clock the render time. Send the two results to this thread. Thanks.
LMI Movieman wrote on 6/4/2008, 3:50 PM
Very interesting!
Did what you suggested with a 5MBpix picture (all I had) stretched to 5 secs.
First render was 9 secs.
Second render was 27 secs!
My machine is an HP 2.4 Quad Core with 3GB Ram
Himanshu wrote on 6/4/2008, 7:47 PM
ritsmer,
Two tools come to mind

(1) 'perfmon' in Windows will measure system performance including CPU usage, disk usage, memory usage, etc. Set it up so that it measures the SVMS exe file and collect data for each render. Compare the results and see what's different.

(2) 'procmon' or process explorer by SysInternals (now part of Microsoft's TechNet site). This will also monitor any running process and can capture all kinds of information including registry accesses, etc. In a separate experiment capture that data to see what's going on.

Maybe one of these will lead you to a clue about the delay on the second run. More information you give Sony will make them pay attention...and don't give up on the support case. Good luck!
ritsmer wrote on 6/5/2008, 12:13 AM
Thanks to LMI Movieman and Himanshu.

I did some of what Himanshu proposed and got:



http://www.freedrive.com/file/361354,vr01.jpg

Strange that all activity (processor % time, pages/sec, disk transfers/sec) are lower for the second rendering - so I investigated that and found that the first time 4 processors are used while the second time only 1 processor is used.
Then I tried again with "Number of rendering threads" set to 1 - but still: first time 4 processors and second time 1 processor...
Now it got interresting: As VMS of course is able to keep count of its rendering threads it had to be something else - and so I suspected the wmv codec. I tried to do the 2 test using the Main Concept MPEG-2 codec and here it was: all tests take the same time and in each test all my 8 processors are busy...

So my conclusion is:
1) probably is an error in the wmv encoder or 2) VMS does not reset it properly each time it is used.

I will send this to support and post their answer here.

Himanshu wrote on 6/5/2008, 5:28 PM
Good findings. I hardly ever render to wmv, so maybe that's why I didn't see much difference. Would be interesting to hear SCS's explanation. Thanks for following up.
ritsmer wrote on 6/6/2008, 9:03 AM
Very quickly the answer from support came today:

+++
When your system allocates RAM usage, it will allocate to an unused portion of current available memory, then after that is used up, it will then have to clear memory of data that is not currently being used in order to allocate space for functions you wish to currently perform. If you have enough available memory the first time you used the Make Movie wizard, the process will occur in less time than it will if the system has to replace the data from the last render with the allocation from the new render being created the second time around.
+++

I have told support (most politely) that the problem can not be a RAM issue (always 4 processors running at the first rendering and thereafter always only 1) and hope that they will investigate the problem closer.

I will post any new answer here.
Himanshu wrote on 6/6/2008, 4:24 PM
Well, the reply from SCS about memory usage could make *some* sense if you did not confirm that just by changing the codec the issue is not repeatable.

Add to it the fact that you have reduced the problem to one simple image render which does not even come close to using using up available RAM (not to mention available paging memory). Perhaps you can ask for the case to be escalated to the software development team.
ritsmer wrote on 6/6/2008, 11:46 PM
I did.
Got a form to fill in and returned it yesterday.
Keep you posted.

edgelore wrote on 7/13/2008, 9:39 AM
Any updates?

The official answer was interesting to me:
+++
When your system allocates RAM usage, it will allocate to an unused portion of current available memory, then after that is used up, it will then have to clear memory of data that is not currently being used in order to allocate space for functions you wish to currently perform. If you have enough available memory the first time you used the Make Movie wizard, the process will occur in less time than it will if the system has to replace the data from the last render with the allocation from the new render being created the second time around.
+++

Is it just me, or doesn't this seem to be a poor way to handle application memory management? Shouldn't Vegas clean up after itself after a render so that the next series of operations have a clean slate? Especially the next render? Another indication to me that Vegas is quite weak when it comes to efficient memory management, and that adds up to lots of issues especially when working in HD.

Of course, this doesn't say anything about why only 1 proc gets used on the second render.

Just curious if there has been any new info here.
ritsmer wrote on 7/13/2008, 2:06 PM
The problem is now with the Vegas development team.

I will keep you posted with any new info.
Himanshu wrote on 7/14/2008, 4:40 AM
edgelore,

By ritsmer's experiments, it's clear that this isn't really a memory management issue alone. In addition keep in mind SCS said "system allocates RAM" not "Vegas allocates RAM" - there are some memory management issues that aren't fully controlled by applications - the operating system controls that. Any case, I think the memory issue is a red herring - the processor usage data may lead to the real issue, and if the dev team is looking into it, we should hear something soon.

Thanks for keeping us updated ritsmer.
ritsmer wrote on 8/2/2008, 2:07 PM
Have just downloaded and installed the new VMSP 9.0 - and tested this issue.

Result: The problem has been solved. Second time rendering to wmv is now as fast as first time.

Thanks to the Vegas developers. Hope my input could help you to target the problem. And thanks to himanshu and others for kind support.
Byron K wrote on 8/4/2008, 11:47 AM
Hey Thanks Ritsmer for bird dogging this issue! I just purchased VMS Platinum 9. And hope to have a little better rendering times.

-Byron