Features

Download

Online

Gallery

Blog

  Index  | Recent Threads  | List Attachments  | Search
 Welcome Guest  |  Register  |  Login
Login Name  Password
 

Sweet Home 3D Forum



No member browsing this thread
Thread Status: Active
Total posts in this thread: 24
Posts: 24   Pages: 3   [ 1 2 3 | Next Page ]
[ Jump to Last Post ]
Post new Thread
Author
Previous Thread This topic has been viewed 24708 times and has 23 replies Next Thread
hansmex
Advanced Member
Member's Avatar

Netherlands
Joined: Sep 26, 2009
Post Count: 3480
Status: Offline
Reply to this Post  Reply with Quote 
Increase memory

Emmanuel:

I remember that there was a thread where you explained how to increase memory used by SH3D. Unfortunately I cannot find that thread anymore.

I would like to increase memory under Ubuntu to 2 GB or (better) 3 GB.

Could you repeat these instructions again or point to the thread in question?

Thank you in advance.

Hans
----------------------------------------
Dual boot - AMD FX6300 6-core, 16GB ram
Windows 10 Pro, SH3D 6.2 with 8 GB memory allowance
Ubuntu 18.04, SH3D 6.2 with 2 GB memory allowance
[Apr 27, 2010, 8:32:03 PM] Show Printable Version of Post    View Member Profile    Send Private Message    Hidden to Guest [Link] Report threatening or abusive post: please login first  Go to top 
Puybaret
Expert
Member's Avatar

France
Joined: Nov 7, 2005
Post Count: 7175
Status: Offline
Reply to this Post  Reply with Quote 
Re: Increase memory

You can change the max memory used by Sweet Home 3D only on the installer version, by changing the value in the -Xmx Java option:
- under Linux, edit SweetHome3D script and update the 1024 value in the option -Xmx1024m,
- under Mac OS X, right click on Sweet Home 3D application icon, select Show Package Contents, open Contents folder, edit Info.plist file by dragging its icon on TextEdit application, and update the 1024 value in the text <string>-Xmx1024m</string>,
- under Windows, create a text file named SweetHome3D.l4j.ini in the same directory as SweetHome3D.exe, and write the max memory Java option in that file, for example:
-Xmx2048m
for 2 GB, then relaunch Sweet Home 3D.

On all systems, 1024m means 1024 MegaBytes.
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D developer
[Apr 27, 2010, 8:54:58 PM] Show Printable Version of Post    View Member Profile    Send Private Message    Hidden to Guest [Link] Report threatening or abusive post: please login first  Go to top 
hansmex
Advanced Member
Member's Avatar

Netherlands
Joined: Sep 26, 2009
Post Count: 3480
Status: Offline
Reply to this Post  Reply with Quote 
Re: Increase memory

Thank you!!
----------------------------------------
Dual boot - AMD FX6300 6-core, 16GB ram
Windows 10 Pro, SH3D 6.2 with 8 GB memory allowance
Ubuntu 18.04, SH3D 6.2 with 2 GB memory allowance
[Apr 27, 2010, 9:32:49 PM] Show Printable Version of Post    View Member Profile    Send Private Message    Hidden to Guest [Link] Report threatening or abusive post: please login first  Go to top 
db4tech
Advanced Member



UK
Joined: May 3, 2010
Post Count: 223
Status: Offline
Reply to this Post  Reply with Quote 
Re: Increase memory

Out of interest I tired this because of a complex scene that wouldn't render and Wow!! (insert shocked face icon here if there was one) what an amazing render speedup side effect!

Why does setting -Xmx1024m shorten render times so drastically, I guess that required memory might be allocated dynamically?

On my Windows 7 machine I just timed a test scene and it took 6:34 (without the SweetHome3D.l4j.ini file) to render.

The exact same scene with -Xmx1024m took just 2:35


Update:
Just had to time it again.

6:20 without the 1GB file
2:40 with the 1GB file

Update 2:
Timed the same scene again, to make absolutely sure, this time I used an electronic stopwatch.

6:22 without the 1GB file
2:36 with the 1GB file, unless my math is wrong that means adding the 1GB file makes rendering about 163% faster smile smile smile

Update 3:
I decided to try different memory sizes to help discover the 'sweet spot'
For some reason Sweet Home won't let me try 2GB and fails to start, even though (also allowing for the OS) I have 2GB spare, could the fact I'm running a 64bit OS cause memory addressing problems for Sweet Home?

So I tried 1.6GB which only made the render 2sec faster at 2:34
Lastly I tired 512MB which gave a render time of 6:22 so the 'sweet spot' definitely seems to be around 1GB for scenes with lots of textures.

Update 4:
When I did my original Sweet Home Virtual Holiday 2010 high resolution render it took around 1h 20m to complete. (Since doing the holiday render I have increased my CPU overclock by a tiny amount) with the 1GB SweetHome3D.l4j.ini file the same scene just rendered in 45m 02s

Update 5:
Low resolution Uber render (the extra render time is worth the more realistic skin and hair texture, not to mention slightly nicer cooker hob reflections) dark marble kitchen scene


11:36 without the 1GB file
11:28 with the 1GB file

Advanced photo render


6:54 without the 1GB file
5:27 with the 1GB file

Conclusion:
Certain scenes render faster than others with the 1GB file, depending on their complexity. Uber shader seems about the same speed with or without the 1GB file, Emmanuel is that because it's not final code?

The 1GB SweetHome3D.l4j.ini will be staying in my Sweet Home folder smile

Could this instruction be built into Sweet Home as standard, with an 'and/or' style line of code, if a users computer has enough memory then 1GB is allocated to drastically improve Advanced photo render performance? Or maybe these tests will help highlight something small that can be tweaked so the shaders can use memory differently for an even greater speed boost without needing to allocate 1GB.

I do hope all these tests have been helpful.

db4tech
----------------------------------------
[Edit 6 times, last edit by db4tech at Jun 17, 2010, 4:14:45 AM]
[Jun 17, 2010, 12:41:10 AM] Show Printable Version of Post    View Member Profile    Send Private Message    Hidden to Guest [Link] Report threatening or abusive post: please login first  Go to top 
hansmex
Advanced Member
Member's Avatar

Netherlands
Joined: Sep 26, 2009
Post Count: 3480
Status: Offline
Reply to this Post  Reply with Quote 
Re: Increase memory

Short question:
Does this mean I should replace my -Xmx2048m with -Xmx1024m ?

Hans
----------------------------------------
Dual boot - AMD FX6300 6-core, 16GB ram
Windows 10 Pro, SH3D 6.2 with 8 GB memory allowance
Ubuntu 18.04, SH3D 6.2 with 2 GB memory allowance
[Jun 17, 2010, 4:34:28 AM] Show Printable Version of Post    View Member Profile    Send Private Message    Hidden to Guest [Link] Report threatening or abusive post: please login first  Go to top 
Puybaret
Expert
Member's Avatar

France
Joined: Nov 7, 2005
Post Count: 7175
Status: Offline
Reply to this Post  Reply with Quote 
Re: Increase memory

db4tech, thank you these interesting tests.
You probably missed this sad part of Sweet Home 3D history last year! laughing
So, no, I won't increase the memory under Windows higher than 512 MB, or not before a long time. sad
Note that Linux and Mac OS X installers request 1024 MB.

Hans, requesting 2048 MB doesn't mean a Java program will use them.
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D developer
[Jun 17, 2010, 8:07:34 PM] Show Printable Version of Post    View Member Profile    Send Private Message    Hidden to Guest [Link] Report threatening or abusive post: please login first  Go to top 
db4tech
Advanced Member



UK
Joined: May 3, 2010
Post Count: 223
Status: Offline
Reply to this Post  Reply with Quote 
Re: Increase memory

Since we know that -Xmx1024m works on Windows 7 and makes a drastic render speed difference, I have now tried the same 1GB on an XP virtual machine with 2GB of memory for you and Sweet Home started straight away.

I can set up a Vista virtual machine and test that if it's helpful?

Could the problem you encountered before be because the users computer had 1GB or less system memory? If so would the idea of a line of code to check the computers base memory before setting -Xmx1024m work and solve the previous problem?

PS: Do you have any ideas why it doesn't make a lot of difference with the Uber shader at the moment.

db4tech
[Jun 18, 2010, 3:19:52 PM] Show Printable Version of Post    View Member Profile    Send Private Message    Hidden to Guest [Link] Report threatening or abusive post: please login first  Go to top 
Puybaret
Expert
Member's Avatar

France
Joined: Nov 7, 2005
Post Count: 7175
Status: Offline
Reply to this Post  Reply with Quote 
Re: Increase memory

I don't know the criterion that could help me determine whether it would work or not. I didn't find a Java bug that would match the problem.

If the bug is bound to the total memory available on the computer, your idea to set the value of -Xmx at program startup is nice, except that it could work only with the version running with the installer and not with applets or with Java Web Start. And in the version with installer it wouldn't be easy to program (it can't be done in Java).

I presume it doesn't make speed difference with Uber shader probably because this kind of shader requires more memory.
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D developer
[Jun 18, 2010, 5:10:03 PM] Show Printable Version of Post    View Member Profile    Send Private Message    Hidden to Guest [Link] Report threatening or abusive post: please login first  Go to top 
db4tech
Advanced Member



UK
Joined: May 3, 2010
Post Count: 223
Status: Offline
Reply to this Post  Reply with Quote 
Re: Increase memory

As a further update:

I have now tried the virtual XP computer with 776MB (just used the slider to select near to 3/4 of 1GB instead of typing in 768MB) and Sweet Home starts straight away with the -Xmx1024m SweetHome3D.l4j.ini file in the Sweet Home root directory.

After that test I then further reduced the XP virtual machines memory down to 512MB and even with the -Xmx1024m file Sweet Home starts and even renders a full scene using Advanced photo render, it did take around 7 minutes to render a 400x267 resolution view, probably because the XP machine is paging out to the hard drive, using it as virtual memory. At least we now know it still works okay with the 1GB file even on computers with only 512MB of memory.

Could the previously encountered problems have been a combination of the users computer not having enough memory plus they had disabled (or set to low) their pagefile?

Here is the 512MB XP computer with -Xmx1024m file Advanced photo render results





Now this next test is just asking for trouble. A Windows 7 (x86 version of the OS) virtual computer running just 512MB of system memory, barely enough to run the OS let alone applications and Sweet Home with a -Xmx1024m SweetHome3D.l4j.ini file still starts and runs okay albeit slowly because the virtual hard drive is being used as virtual (virtual (if you will)) memory. smile

This is the 512MB Windows 7 computer with -Xmx1024m file render (sorry forgot to time it)


db4tech
[Jun 19, 2010, 7:05:39 AM] Show Printable Version of Post    View Member Profile    Send Private Message    Hidden to Guest [Link] Report threatening or abusive post: please login first  Go to top 
Puybaret
Expert
Member's Avatar

France
Joined: Nov 7, 2005
Post Count: 7175
Status: Offline
Reply to this Post  Reply with Quote 
Re: Increase memory

Thank you for your detailed report.
Could the previously encountered problems have been a combination of the users computer not having enough memory plus they had disabled (or set to low) their pagefile?
This is the test that was missing and I just tried to run Sweet Home 3D with no paging (swap) file. To disable this feature in Windows, read this article (or this one for French readers). On a Windows XP computer with 512 MB and no paging file, I still was able to launch and use Sweet Home 3D with the -Xmx1024m option. When I read a large home file, it finally crashed with the following log message:

#
# A fatal error has been detected by the Java Runtime Environment:
#
# java.lang.OutOfMemoryError: requested 32756 bytes for ChunkPool::allocate. Out of swap space?
#
# Internal Error (allocation.cpp:117), pid=2644, tid=2748
# Error: ChunkPool::allocate
#
# JRE version: 6.0_20-b02
# Java VM: Java HotSpot(TM) Client VM (16.3-b01 mixed mode windows-x86 )
# An error report file with more information is saved as:
# C:\Documents and Settings\Emmanuel\workspace\SweetHome3D\hs_err_pid2644.log
#

but as long as you don't request too much memory in Sweet Home 3D, it runs with no problem.
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D developer
[Jun 19, 2010, 9:25:27 AM] Show Printable Version of Post    View Member Profile    Send Private Message    Hidden to Guest [Link] Report threatening or abusive post: please login first  Go to top 
Posts: 24   Pages: 3   [ 1 2 3 | Next Page ]
[ Jump to Last Post ]
Show Printable Version of Thread  Post new Thread

    Get Sweet Home 3D at SourceForge.net. Fast, secure and Free Open Source software downloads
   
© Copyright 2006-2020 eTeks - All rights reserved