I was working on a kind of SMTP kinda protocol, I made it in java and run successfully. It was consuming about 20 to 30 MB in my laptop. Later I decided to make the protocol live on internet. I purchased the servers(VPS), domain. It costed me a lot. But when I tried to run my program over that server I was so shocked that my program was consumption about 800 to 900 MB for each class I was running. I thought it may be my programming fault, I tried a lot to recover from problem but I could not. Later a friend of mine suggested me to test a simple Hello word program on same server, I was so shocked that even that program was eating up to 900 MB of my total RAM.
What kinda of problem can it be ? Is it the fault in those servers, or their OS and kernels versions ? Is it problem of JVM with Linux kernels or older linux kernels. I have even tried with older JVMs but no use. :(
I tried most of popular flavors of Linux but it worked same and had exactly same problem on all Linux flavors. Was eating huge memory in all cases. ( All of them had Linux kernel 2.6.xx)
But it worked very smooth and consumed expected memory in my laptop. (about 30 to 50 Mb). I use Linux in my laptop. But the difference is that my kernel is above 3.1.xx . Can it be the problem ? I am really so disappointed with behavior of my servers and have lost lots of money in it. Please anybody tell me the possible solutions, can it be the problem of Linux kernel or its problem in my programming.