[NTLUG:Discuss] Linux software/hardware Server based questions

Steve Baker sjbaker1 at airmail.net
Wed Aug 8 21:00:25 CDT 2001


Carlo Pellegrini wrote:
> 
> Hello,
> I am new to Linux and I have some questions about
> using Linux for a project in development. The project
> involves using server-side Java(JSP/servlets) to
> create charts(png images)dynamically. We use classes
> from Sitraka Jclass ServerChart. What we have observed
> so far in our beta testing is that the creation of
> these images consumes significant server resources(CPU
> and RAM) through the Java Virtual Machine processing.

If you were to rewrite your code in a compiled language
(C or C++ would be obvious candidates), you should find
the workload drops by a factor of at least 10 to 20 - in
some cases as much as 50...depending on how much of the
work is being done by library functions and how much in actual
Java code.

How many lines of Java code is there in the program?

Maybe you don't have to replace it all - perhaps just recoding
the inner loops in C/C++ would suffice.

That may not be a very cheap solution for just one or two
servers - but if there are lots of them, it's worth the
one-time cost to rewrite the code in a more efficient
language.

Upgrading your hardware would certainly speed things up - but
not as much as this I think.

Do you have a feel for whether a factor of two or three speedup
is "enough" ?

----------------------------- Steve Baker -------------------------------
HomeMail : <sjbaker1 at airmail.net>   WorkMail: <sjbaker at link.com>
HomePage : http://web2.airmail.net/sjbaker1
Projects : http://plib.sf.net     http://tuxaqfh.sf.net  http://tuxkart.sf.net
           http://agtoys.sf.net   http://prettypoly.sf.net
           http://freeglut.sf.net http://toobular.sf.net



More information about the Discuss mailing list