Can these two apps share??

marfarma

Not Your Bitch
Jul 24, 2008
218
10
0
Is it a very bad idea to run both these apps on the same server (with an EC2 'small instance' in mind)? Should I set up VPS containers to isolate them from each other? I know I can get my answer by testing it. But if it strikes you as doomed to fail I won't waste my time testing it. Here are more details.

To begin with, I don't need or want a control panel. With the first app, a php based e-commerce app, they recommend 512MB ram, for the second, a big ass Java ERM suite, they recommend 2GM ram, but also say it will run reasonably well, under light usage, on an EC2 small instance (1.7GB ram). The e-commerce app should see relatively light usage - less than 1000 uniques per day. The ERP suite would have a single user and might actually be brought down when not actively in use.

Thoughts??
 


Since the second app actually recommends 2GB, I would actually get a dedicated server (even if all you do is create one big VPS using most of the resource of the dedi).

Far as if they can work 'together' depends on how you have them configured, such as seperate domains and such.

Do either apps actually require apache? I think you could greatly minimize your usage if you just use something like the Nginx webserver like I do. I'm not using much on my personal VPS (which is on my dedi), but an nginx + mysql 5 + php 5.3 + supervisord consumes about 170MB after running for a while. This is my 'ps aux' screen for example:

USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
root 1 0.0 0.1 10304 740 ? Ss Mar26 0:02 init [2]
root 20346 0.1 0.8 66052 3288 ? Ss 12:05 0:00 sshd: root@pts/0
root 20366 0.0 0.4 17556 1800 pts/0 Ss 12:05 0:00 -bash
root 20375 0.0 0.2 14720 976 pts/0 R+ 12:05 0:00 ps aux
root 25691 0.0 2.8 81876 11072 ? Ss Apr15 0:00 /opt/bin/python2.6 /opt/bin/supervisord
root 25693 0.0 8.8 124872 34984 ? S Apr15 0:28 /opt/php/bin/php-cgi-5.3 -c /etc/php-5.3.ini
root 25694 0.0 7.6 119784 30064 ? S Apr15 0:31 /opt/php/bin/php-cgi-5.3 -c /etc/php-5.3.ini
root 25695 0.0 8.5 123268 33560 ? S Apr15 0:31 /opt/php/bin/php-cgi-5.3 -c /etc/php-5.3.ini
root 25696 0.0 8.5 124060 33744 ? S Apr15 0:34 /opt/php/bin/php-cgi-5.3 -c /etc/php-5.3.ini
root 25697 0.0 0.6 21324 2740 ? S Apr15 0:00 nginx: master process /opt/sbin/nginx
mysql 25698 0.0 2.5 137208 10012 ? Sl Apr15 0:01 /usr/sbin/mysqld --basedir=/usr --datadir=/var
root 25699 0.0 0.8 22296 3256 ? S Apr15 0:01 nginx: worker process
root 25700 0.0 0.7 21972 3108 ? S Apr15 0:01 nginx: worker process
root 25701 0.0 0.8 22396 3320 ? S Apr15 0:00 nginx: worker process
root 25702 0.0 0.7 21972 3076 ? S Apr15 0:00 nginx: worker process
root 26532 0.0 0.2 18540 936 ? Ss Mar26 0:02 /usr/sbin/cron
root 28509 0.0 0.3 48856 1192 ? Ss Mar26 0:00 /usr/sbin/sshd
root 32130 0.0 0.1 5896 680 ? Ss Mar27 0:23 /sbin/syslogd

(each one of those nginx workers can handle up to 2,000 simultaneous connections)

But alas that depends if either application requires apache or not. And since you don't need a control panel something like nginx or lighttpd may actually help. I think both would be fine, if you configure it right and give it enough resources, and turn off all the crap you don't need.

PS: A heavy use site such as textsfromlastnight.com when switched to nginx (I did the switching), out of the 16GB of rams on one of their servers, nginx (around 16 workers) + php (around 64 workers) + supervisord took up mainly ~ 500-800MB of rams, for the 5-6 million hits a day they been getting. Most of the remaining memory was consumed by MySQL and caching services. When was using apache, kept crashing under the same load.
 
I know the ecommerce can run under nginx, I believe the java app can as well.

Who do you like for dedicated servers?
 
I know the ecommerce can run under nginx, I believe the java app can as well.

Who do you like for dedicated servers?

I'm currently using WholeSaleInternet.com (which is the same datacenter zensix.com and zensix.org uses). Primarily because the price is rather good and the quality is rather decent, the only thing I don't like about em is trying to get a sales inquiry or upgrade done over the weekend. But other than that good price, and really easy (for me anyways) to go in and install SolusVm + OpenVz and just create VPS containers rather than messing with the core dedicated server. I created an nginx container template for OpenVz based on what I originally setup manually.