On Sat, 09 Jan 2021 21:05:37 +0000, Ahem A Rivet's Shot wrote:
> Of executable code, the Java Byte Code needs a JVM to run it and
> they tend to be memory hogs IME.
>
Its not that bad: everything I've written has run well on 32 bit
hardware: in that environment under Linux the limit tends to be the
process address space since I never set the swap partition to less that
twice physical memory.
In that environment the only time I've seen a Java program have memory
problems is one of mine that loads potentially very large documents into
a PostgreSQL DB. It pulls in a lot of library code too, including
JavaMail, Mstor and the JDBC code needed to talk to PostgreSQL. In all
cases failures due to running out of memory were the result of exceeding
the -Xmm defined memory space, i.e. nothing to do with JVM or code size
because every time that happened, the run was successful after I'd
increased -Xmm. IIRC that box had around 500MB of RAM.
Since moving it to a 64-bit system with 4GB RAM and explicitly setting -
xmm in the shell script that launches it I haven't hit and OOM problems
with it.
This issue is no worse than running a large C++ program with dynamically
loaded library code. In fact it might well be better since the JVM uses a
JIT compiler to recompile frequently used Java classes to native code
and, presumably, discards the P-code as soon as its been replaced by
native code.
Similarly, a Swing-based roster editor I wrote to support a club I belong
to only occupies 1.3 MB of RAM with a little 4777 duty slots assigned:
that's the complete roster of weekend duties over a six month season with
14 duty assignments on each rostered day.
So, bottom line: I've developed and run fairly substantial Java programs
on relatively small Linux boxes and never had issues with running out of
memory.
--
--
Martin | martin at
Gregorie | gregorie dot org
--- SoupGate-Win32 v1.05
* Origin: Agency HUB, Dunedin - New Zealand | FidoUsenet Gateway (3:770/3)
|