Hello VPS (Virtual Private Server)
As I mentioned eariler, my blog site has out-grown my cheap “shared” hosting account. WP-Cache (suggested by Johnny) helped a little but did not solve my problems. So, I decided to switch to a Vitrual Private Server at Tektonic and run my own server on Fedora. It is only slightly more expensive than mass hosting ($14/mo for 256MB dedicated RAM and $28/mo for 512MB). The service seems good so far. Let’s hope it stays this way!
With VPS, I can finally run JBoss in my hosting account! The only caveat is that JBoss with all the EJB3 / Seam goodies is a real memory hog when starting up — you do need 512 MB RAM. But once it starts up, the memory use is stable (no memory leak in Seam applications thanks to better session state management!) and the CPU load is in lower single digit even I hit the app hard.
With VPS, I also get to run my own mail servers and MySQL database server. It has been a couple of years since I last ran a Linux server. So, it takes some time to get everything working properly. But once it is set up, it runs a lot faster and smoother than the mass hosting provider.
Of course, that also means I now have to secure my server and keep software updated. Yum automatic update is great for that. However, the VPS host cannot install “Red Hat “Unfakeable” Linux” on my VPS even if I have a license from Red Hat. Only if I can get a Red Hat Network subscription with the VPS …
November 1st, 2006 at 2:12 pm
CentOS is really good.
November 1st, 2006 at 6:05 pm
Yes, the VPS host does provide CentOS as one of the installation options. But I figure that CentOS is really only good if I can get quality updates from RedHat Network. If I have to update via YUM anyways, I’d rather have Fedora for the more cutting edge packages.
November 1st, 2006 at 11:20 pm
I’d recommend against running the latest and greatest Operating systems because security will be a much higher concern when on the cutting edge. First rule of security is to remove all the software you can in order to reduce the amount of potential entry points into your server. The older versions have been run through the mill per say, and tend to be less likely for bugs.
For example I recommend disallowing telnet/ftp in any form. I also recommend converting to a ssh with SSH2 using private key encryption as the only means of entry into your system, and to place SSH on a non-standard port. For example I require SSH2 on my server, and I use Putty to telnet and putty’s pscp to copy files to my server. By using private keys it actually makes logging in, as well as file copies, more convenient and secure. No chances to “guess” the password…
Using these techniques you can reduce the likelyhood of the most common auto-scanning tools finding potential entry points into your system.
I’m not a security expert so take it with a grain of salt, those are just some of the recommendations I got when searching for techniques to secure my server when I first got it.
November 2nd, 2006 at 1:54 am
Yeah, the nice thing about TekTonic is that it provides a control panel to easily configure the firewall and auto-start services on your VPS.
November 3rd, 2006 at 2:59 am
Hi,
I read in your blog you are running fedora and also run your own mail server.
Me to, if you have a lot SPAM, perhaps this is interesting:
http://ovenordstrom.blogspot.com/2006/10/90-of-spam-email-have-now-disappear.html
-ove
November 10th, 2006 at 6:13 pm
Hi,
I too have hosted on Tektonic, but in the Managed Server with 256 MB Ram. Any idea if its a good thing to do with a plain simple servlet with hibernate?
I have around 25 classes being mapped and its just simply not loading and I suspect its because of hibernate.
yes, vps is a interesting world
… so much can be done with a root login access.
- gyani
November 10th, 2006 at 6:20 pm
Are you running with plain Tomcat or JBoss AS? Maybe 256MB would be sufficient for Tomcat? What is the error message in your log?
November 10th, 2006 at 7:08 pm
Its just plain Tomcat with Hibernate inside it. There is no error message.
I think tomcat refused to load when hibernate initialized and I looked around to see if there was any error trail left, but couldnt find any. The JVM itself is missing, so I presume Hibernate crashed it due to low memory.
On commenting the Hibernate init code, the servlet ran quite well infact.
So I am wondering is 256 MB the real culprit there? Atleast it should not crash the JVM !!!
November 10th, 2006 at 7:10 pm
What I found out is that the VPS management software kills the JVM process once it deems the JVM is consuming too much memory. It might be what’s happening to you here. I assume that your app runs fine on your local machine, right?
November 10th, 2006 at 7:16 pm
Yes, it does, I have around 750 Meg Ram here, so I guess it should run fine. Maybe you have a point. I am worried actually now. More then $40 is kinda high, so wondering what to do !!!
November 10th, 2006 at 7:20 pm
Well, unmanaged accounts are a lot cheaper …
November 10th, 2006 at 7:23 pm
Yes, I am thinking on survival without support
I think the memory issue you talked about was because seam and hibernate would do a lot of bytecode injection into the existing classes, probably the reason why we see the increase in mem requirements. Probably a precompiled bytecode injection would have helped.
November 10th, 2006 at 7:35 pm
I do not think it is a bytecode injection issue. But you can try.
Another option you can try is to go into the Tomcat startup script and constrain the JVM heap size to 128MB or something. Just add -Xmx option to JAVA_OPTS in bin/catalina.sh script.
But that did not do much good for me …
November 11th, 2006 at 4:46 am
Yes, it wouldnt help, i tried that option also.
It seems to me that enterprise Java hogs up too much memory and cpu resources and other ones like ruby / php is too small to build enterprise applications. I will looking to a upgrade in a unmanaged environment.
Thaks mike for the discussion, it was good talking to you!!
November 12th, 2006 at 8:24 pm
Thought of posting a followup, for those readers who visit this discusson we just had.
Tektonic was kind enough to provide us a weeks of free RAM upgrade to 512 MB and our servlet loaded. Yes, after the initial burst required to load, the servlet did stabalize.
So, incase you are using hibernate based applications and face the issue that I feced, just do a upgrade to a min 512 MB ram and things should work fine.
November 12th, 2006 at 8:26 pm
Excellent. Thanks for following up, Gyani!
November 29th, 2006 at 9:20 pm
Hello Michael,
it seems like TekTonic is just the ting I am looking for.
I need a full root acess so that I could install RoR. The only thing is that I am no expert in installing operating systems and establishing root/ftp/mail accounts.
I was wandering if you could let me know what steps you took to have a functioning server with them?
I guess the questions I am really asking is wether I will be able to setup all the “things” by myself, before actually shelling out $14(alot of money for me - as I alreayd pay that much for another host). I am in a 4th year in university at computer science and i don’t know what else is required… hehe..