Increasing RAM

40 views
Skip to first unread message

Liz Slooten

unread,
Jun 29, 2022, 2:13:40 PM6/29/22
to netlogo-users
My computer is assigning very little CPU to running Netlogo, and is therefore running Netlogo rather slow. It is a Mac Pro desktop computer: 3.33 GHz 6-Core Intel Xeon, 12 GB 1333 MHz DDR3. Have looked at the FAQs on "How big can my model be..." which mentions finding the ".cfg" file and modifying "-Xmx1024m" to increase the value to increase the amount of CPU allocated.

I have found a jvm.cfg file, but it does not include the text "-Xmx1024m". It looks to be a text file only, see below.

There are two files on my computer that do include "-Xmx1024m". They are:
netlogo-headless.sh
netlogo-gui.sh

I will go ahead and increase the number following Xmx in those two files, but what should I increase it to? Should it be a multiple of 1024? Can I increase it to any arbitrary amount, e.g. 5000?

Many thanks!

Liz


Content of the jvm.cfg file:
# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
# published by the Free Software Foundation.  Oracle designates this
# particular file as subject to the "Classpath" exception as provided
# by Oracle in the LICENSE file that accompanied this code.
#
# This code is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
# version 2 for more details (a copy is included in the LICENSE file that
# accompanied this code).
#
# You should have received a copy of the GNU General Public License version
# 2 along with this work; if not, write to the Free Software Foundation,
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
#
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
# or visit www.oracle.com if you need additional information or have any
# questions.
#
# List of JVMs that can be used as an option to java, javac, etc.
# Order is important -- first in this list is the default JVM.
# NOTE that this both this file and its format are UNSUPPORTED and
# WILL GO AWAY in a future release.
#
# You may also select a JVM in an arbitrary location with the
# "-XXaltjvm=<jvm_dir>" option, but that too is unsupported
# and may not be available in a future release.
#
-server KNOWN
-client IGNORE

li

unread,
Mar 6, 2023, 12:44:12 PM3/6/23
to netlogo-users

Hi @netlogo-users!


My model is quite big, and when I try to run it, it says that the model is too large to run. I've been looking for answers but haven't found any until I came across this post. 
As for my concern, it is quite related to this one. I was only able to locate jvm.cfg file, and I'm not sure which file I should modify because I couldn't find the .cfg file mentioned in the user manual. By the way, I am using the Macbook Air M1 2020, macOS Monterey version 12.3.1 8GB of RAM

Many thanks!

Li 

Aaron Andre Brandes

unread,
Mar 7, 2023, 12:22:57 PM3/7/23
to li, netlogo-users

Hi Li,

We are sorry you ran into this problem.

 

I recommend you update to NetLogo 6.3.0 if you are not already using it (download here)

 

The post you included does not have the correct name of the relevant configuration file.

 

If you do a standard NetLogo installation the configuration file will be

/Applications/NetLogo 6.3.0/NetLogo 6.3.0.app/Contents/app/NetLogo 6.3.0.cfg

 

 

In the file you will find the lines

 

[JavaOptions]

java-options=-Djpackage.app-version=1.0

java-options=-Xmx1024m

 

Edit the file so that -Xmx1024m is replaced by -XX:MaxRAMPercentage=50, resulting in

 

[JavaOptions]

java-options=-Djpackage.app-version=1.0

java-options=-XX:MaxRAMPercentage=50

 

The JVM will now automatically allow NetLogo to use up to have of your RAM.

This has worked well for me, and doesn't require specifying a specific number for RAM allocation.

 

Let us know if you need more help.

- Aaron

 

-- 

Aaron Brandes, Software Developer

Center for Connected Learning and Computer-Based Modeling

 

 

From: netlog...@googlegroups.com <netlog...@googlegroups.com> on behalf of li <xohyu...@gmail.com>
Date: Monday, March 6, 2023 at 12:44 PM
To: netlogo-users <netlog...@googlegroups.com>
Subject: [netlogo-users] Re: Increasing RAM

Hi @netlogo-users!

 

My model is quite big, and when I try to run it, it says that the model is too large to run. I've been looking for answers but haven't found any until I came across this post. 

As for my concern, it is quite related to this one. I was only able to locate jvm.cfg file, and I'm not sure which file I should modify because I couldn't find the .cfg file mentioned in the user manual. By the way, I am using the Macbook Air M1 2020, macOS Monterey version 12.3.1 8GB of RAM

 

Many thanks!

 

Li 

--
You received this message because you are subscribed to the Google Groups "netlogo-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to netlogo-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/netlogo-users/c4275410-374d-49b2-a639-4a1df45d52d9n%40googlegroups.com.

Reply all
Reply to author
Forward
0 new messages