The script works great - good improvements!
/Thomas
From: Tomas Pluskal [mailto:plus...@oist.jp]
Sent: 28. november 2014 04:31
To: Developer discussion
Subject: Re: [Mzmine-devel] Startup script for Windows - wmic
Hi Thomas,
You were right. I fixed the problem and I added a few output messages to the
startup scripts, so the user knows how the heap size is actually set.
Please let me know if you find any problem with these updated scripts.
Cheers,
Tomas
On Nov 26, 2014, at 19:53, TFRD (Thomas Franck Dyrlund)
<t...@steno.dk<mailto:t...@steno.dk>> wrote:
I have been looking at the startup script for Windows:
rem Obtain the physical memory size
IF EXIST 'C:\Windows\System32\wbem\wmic os get totalvisiblememorysize' (
rem Get physical memory size from OS
for /f "skip=1" %%p in ('C:\Windows\System32\wbem\wmic os get
totalvisiblememorysize') do if not defined TOTAL_MEMORY set TOTAL_MEMORY=%%p
) ELSE (
rem Set 2GB as default - heap size will be set to 1G
set TOTAL_MEMORY=2000000
)
>From what I can see then the above script will always enter both the if and
>else part of the statement and the total memory will therefore always be set
>to ~2 GB (at least that how it is working on my Windows 7). I have no idea why
>this is happening. Anyway, I suggest changing the script to the following:
rem Obtain the physical memory size and check if we are running on a 32-bit
system.
IF EXIST C:\Windows\System32\wbem\wmic.exe (
rem Get physical memory size from OS
for /f "skip=1" %%p in ('C:\Windows\System32\wbem\wmic os get
totalvisiblememorysize') do if not defined TOTAL_MEMORY set TOTAL_MEMORY=%%p
for /f "skip=1" %%x in ('C:\Windows\System32\wbem\wmic cpu get addresswidth')
do if not defined ADDRESS_WIDTH set ADDRESS_WIDTH=%%x
) else (
rem Set 2GB as default - heap size will be set to 1G
set TOTAL_MEMORY=2000000
)
rem The HEAP_SIZE variable defines the Java heap size in MB.
rem That is the total amount of memory available to MZmine 2.
rem By default we set this to the half of the physical memory
rem size, but feel free to adjust according to your needs.
set /a HEAP_SIZE=%TOTAL_MEMORY% / 1024 / 2
rem If we are running on a 32-bit system, force the heap size to 1024 MB.
if %ADDRESS_WIDTH%==32 (
set HEAP_SIZE=1024
)
Any objections?
/Thomas
------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk_______________________________________________
Mzmine-devel mailing list
Mzmine-devel@lists.sourceforge.net<mailto:Mzmine-devel@lists.sourceforge.net>
https://lists.sourceforge.net/lists/listinfo/mzmine-devel
===============================================
Tomas Pluskal
G0 Cell Unit, Okinawa Institute of Science and Technology Graduate University
1919-1 Tancha, Onna-son, Okinawa 904-0495, Japan
WWW: https://groups.oist.jp/g0
TEL: +81-98-966-8684
Fax: +81-98-966-2890
------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk
_______________________________________________
Mzmine-devel mailing list
Mzmine-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mzmine-devel