"The differential equations that describe dynamic interactions of power generators are similar to that of the gravitational interplay among celestial bodies, which is chaotic in nature."
Originally posted by Nicholas Jordan:
[Doug Slattery:] I'll repost it in this thread where it seems more appropriate...
Probably should start a new thread, post new topic.
I was using the Search First etiquette from the FAQ to not hijack this thread.
I'll start a new thread if this one hasn't been moved after I finish replying.
[Doug Slattery:] After deploying some sites, there were complaints that they were slow.
define slow - along with server load generalizations and some picture of what is meant by slow.
As this information is from my former employer, I no longer have access to it. However, after rewriting the cgi's in 'C', performance did noticeably improve under the same and heavier loads as the number of users accessing the site increased over time. I should also mention the server is Linux based (RedHat ES3) quad processor system using Apache with 16GB ram.
[Doug Slattery:] But to use Java as a cgi on a high traffic web server?.?.
cgi invokes a new process for each request - java's approach to Threading begs the world to run it on true mp - this requires hardware and compiler to make some realistic use of Thread dispatching on mp bus architecture - which is not fully documented in the coder's library. A true parallelizing implementation of Java on a true MP hardware base would collapse runtimes to vanishing response times.
Understood, but for my situation, afaik threading isn't necessary. Every request is first authenticated against session information stored on the server that gets created when a user logs in. There's a split at this point depending if the authentication is good or not. Assuming it's good, more than likely access to the database would happen. When that comes back, an html generator would dynamically create the response page with the results of the query. Pretty basic stuff.
Could one of the possible causes of the reported slowness be contributed to the overhead of JIT? Another possibility I'm unsure of is doesn't the JVM have to run before the Java program, thus adding more overhead? Could the problem also be inherent in the Java language itself?
[Doug Slattery:] The proposed solution was to add faster servers. To me, that's kind of stupid because the systems are scalable and that solution is only short term as the root problem will scale exponentially.
See Books by Dov Bulka
Java Performance and Scalability - 2000 Efficient C++ : Performance Programming Techniques - 1999 - 332
Then let's continue this discussion.
I understand about writing efficient programs. That and security are to of my top pet peeves. I've done lots of reading on optimizing code and optimizing compilers (in 'C' that is). I'm still a little green when it comes to Java, which is why I'm asking these questions .
[Doug Slattery:] I'm not knocking JIT, as it has a well suited place such as a daemon or service where it will be running for long periods of time and the JIT overhead will be minimal.
Consider this evaluation as contra-distinct to your opening position.
I'll respectfully disagree and elaborate a bit more that my opinion is based on using Java for cgi programs on a high traffic web server considering JIT adds overhead (and maybe other things as well) as opposed to a stand alone executable.
[Doug Slattery:] I also wonder why they decided to use JIT, and not create a standalone executable?.?. Couldn't the JVM check for it at runtime and compile one if it doesn't exist?.
How many times have you tried to sell equipment ?
I was self employed for 8 years and have moved a lot of iron my friend.
Java is remarkably powerful, but looks to me like a testbed that can be re-compiled into faster object code.
I'll agree with you there. I do find it more convenient to use over 'C' in a lot of cases (device drivers excluded) .
It's really a design decision,
Ok
look at some of the beginner work we see at javaranch, would you want that running in kernel, ring-0 services ?
Although, I doubt that Java can run in a "true" kernel (operating system that is) as it stands today.
Think about your question, we will be moved by the Moderator .... maybe you can have some productive speculation by then.
http://www.docdubya.com/belvedere/cpp/question.htm
[ September 29, 2007: Message edited by: Nicholas Jordan ]
Understood, but for my situation, afaik threading isn't necessary. Every request is first authenticated against session information stored on the server that gets created when a user logs in. There's a split at this point depending if the authentication is good or not. Assuming it's good, more than likely access to the database would happen. When that comes back, an html generator would dynamically create the response page with the results of the query. Pretty basic stuff.
Could one of the possible causes of the reported slowness be contributed to the overhead of JIT? Another possibility I'm unsure of is doesn't the JVM have to run before the Java program, thus adding more overhead? Could the problem also be inherent in the Java language itself?