Re: Seperating Application server and Database server
In addition to what the others told you, security would be a big reason. If the application server is compromised, whether through your application code or some other service on the box, then they also have local access to the database files. If you setup a database server, you can open just the port(s) that are required to communicate with the database and allow only the ip address of the application server. Yes, if the application server is compromised, it can be used to connect to database server, but at least it's another hurdle. Also, by splitting them, it allows much more flexibility, For instance, what if there is a problem with the application server or you want to upgrade it? If everything is on one box, you would need to take the database down with everything else even though you are not changing anything in the db. - Original Message - From: Ratheesh K J [EMAIL PROTECTED] To: mysql@lists.mysql.com Sent: Monday, August 28, 2006 12:49 AM Subject: Seperating Application server and Database server Hello all, Currently our application and MySQL server are on the same machine. When should these be seperated? What are the main reasons that we should be having a seperate DB server? Ratheesh Bhat K J -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Seperating Application server and Database server
I am a bit confused here!!! We thought seperating our App server and DB server bcoz we spotted some performance problems. There are queries taking about 40 seconds to fetch about 300 odd rows ( dont kno if I can relate this to a fight b/w app and db for cpu and/or mem). We have a 4GB RAM. When we see the result of TOP from the box it shows this: 98 processes: 97 sleeping, 1 running, 0 zombie, 0 stopped CPU states:cpuuser nice system irq softirq iowait idle total 2.9%0.0%0.2% 0.0% 0.0% 10.9% 85.8% cpu001.8%0.0%0.6% 0.0% 0.2% 2.0% 95.4% cpu014.0%0.0%0.2% 0.0% 0.0% 19.8% 76.0% cpu025.8%0.0%0.0% 0.0% 0.0% 2.4% 91.8% cpu030.0%0.0%0.2% 0.0% 0.0% 19.6% 80.2% Mem: 4114248k av, 4087836k used, 26412k free, 0k shrd, 78148k buff 3185764k actv, 363900k in_d, 97588k in_c Swap: 2048248k av, 228832k used, 1819416k free 2495180k cached I have a question here: Of the available 4GB i can see only 26412k (25M) free, and there are around 30 Mysql threads consuming around 30% mem. as can be seen below PID USER PRI NI SIZE RSS SHARE STAT %CPU %MEM TIME CPU COMMAND 24583 mysql 15 0 1222M 1.2G 3296 S 0.0 30.4 11:11 0 mysqld 24584 mysql 15 0 1222M 1.2G 3296 S 0.0 30.4 0:07 2 mysqld 24585 mysql 15 0 1222M 1.2G 3296 S 0.0 30.4 0:02 0 mysqld 24586 mysql 15 0 1222M 1.2G 3296 S 0.0 30.4 0:05 1 mysqld 24587 mysql 15 0 1222M 1.2G 3296 S 0.0 30.4 228:05 1 mysqld 24588 mysql 15 0 1222M 1.2G 3296 S 0.0 30.4 2:50 0 mysqld 24589 mysql 15 0 1222M 1.2G 3296 S 0.0 30.4 7:07 0 mysqld 24590 mysql 15 0 1222M 1.2G 3296 S 0.0 30.4 5:33 3 mysqld 24591 mysql 15 0 1222M 1.2G 3296 S 0.0 30.4 6:35 3 mysqld 24594 mysql 15 0 1222M 1.2G 3296 S 0.0 30.4 4:45 0 mysqld 27078 mysql 15 0 1222M 1.2G 3296 S 0.0 30.4 8:27 1 mysqld 27330 mysql 15 0 1222M 1.2G 3296 S 0.0 30.4 16:01 2 mysqld 29496 mysql 15 0 1222M 1.2G 3296 S 0.0 30.4 24:27 0 mysqld 26657 mysql 15 0 1222M 1.2G 3296 S 0.0 30.4 2:51 0 mysqld 28535 mysql 15 0 1222M 1.2G 3296 S 0.0 30.4 0:03 0 mysqld 30578 mysql 15 0 1222M 1.2G 3296 S 0.0 30.4 1:42 3 mysqld 1664 mysql 15 0 1222M 1.2G 3296 S 0.0 30.4 0:29 3 mysqld 2546 mysql 15 0 1222M 1.2G 3296 S 0.0 30.4 0:21 2 mysqld 2767 mysql 15 0 1222M 1.2G 3296 S 0.0 30.4 0:23 3 mysqld 2770 mysql 15 0 1222M 1.2G 3296 S 0.0 30.4 0:00 0 mysqld 2772 mysql 15 0 1222M 1.2G 3296 S 0.0 30.4 0:00 2 mysqld 16895 mysql 15 0 1222M 1.2G 3296 S 0.0 30.4 2:26 2 mysqld 17058 mysql 15 0 1222M 1.2G 3296 S 0.0 30.4 1:35 2 mysqld 17181 mysql 15 0 1222M 1.2G 3296 S 0.8 30.4 1:02 1 mysqld 17182 mysql 15 0 1222M 1.2G 3296 S 0.0 30.4 1:15 2 mysqld 17267 mysql 15 0 1222M 1.2G 3296 S 0.0 30.4 0:44 2 mysqld 17300 mysql 15 0 1222M 1.2G 3296 S 0.6 30.4 1:10 3 mysqld 17701 mysql 15 0 1222M 1.2G 3296 S 0.0 30.4 0:24 0 mysqld 18018 mysql 15 0 1222M 1.2G 3296 S 0.0 30.4 0:05 0 mysqld 18019 mysql 15 0 1222M 1.2G 3296 S 0.0 30.4 0:23 1 mysqld But there are no queries running and no major applications running either. Then how is that a lot of RAM is being used up? I m totally clueless as to what is happening In such a case should we be thinking of increasing the RAM capacity or is seperating app and db server better?? any suggestion ll be hlpful Thanks Ratheesh K J - Original Message - From: Brent Baisley [EMAIL PROTECTED] To: Ratheesh K J [EMAIL PROTECTED]; mysql@lists.mysql.com Sent: Monday, August 28, 2006 7:33 PM Subject: Re: Seperating Application server and Database server In addition to what the others told you, security would be a big reason. If the application server is compromised, whether through your application code or some other service on the box, then they also have local access to the database files. If you setup a database server, you can open just the port(s) that are required to communicate with the database and allow only the ip address of the application server. Yes, if the application server is compromised, it can be used to connect to database server, but at least it's another hurdle. Also, by splitting them, it allows much more flexibility, For instance, what if there is a problem with the application server or you want to upgrade it? If everything is on one box, you would need to take the database down with everything else even though you are not changing anything
RE: Seperating Application server and Database server
The only reason that I can think of is to balance the load among systems. This might be because you want to split the load between the data base server and the application, or because you want to run the application on more than one server. Regards, Jerry Schwartz Global Information Incorporated 195 Farmington Ave. Farmington, CT 06032 860.674.8796 / FAX: 860.674.8341 -Original Message- From: Ratheesh K J [mailto:[EMAIL PROTECTED] Sent: Monday, August 28, 2006 12:49 AM To: mysql@lists.mysql.com Subject: Seperating Application server and Database server Hello all, Currently our application and MySQL server are on the same machine. When should these be seperated? What are the main reasons that we should be having a seperate DB server? Ratheesh Bhat K J -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Seperating Application server and Database server
Hello all, Currently our application and MySQL server are on the same machine. When should these be seperated? What are the main reasons that we should be having a seperate DB server? Ratheesh Bhat K J
Re: Seperating Application server and Database server
Ratheesh K J wrote: Hello all, Currently our application and MySQL server are on the same machine. When should these be seperated? What are the main reasons that we should be having a seperate DB server? There are at least three possible reasons. First, if your applications are using lots of CPU power, moving them to their own server should speed up the DB. If your applications use a lot of disk I/O, other than the DB, that's another reason. Memory is another. If the machine is maxed out on RAM and you are using all of it, having the applications on their own machine should also help. If you move it, you need to be sure to have enough network band width between the two machines. -- Chris W KE5GIX Gift Giving Made Easy Get the gifts you want give the gifts they want One stop wish list for any gift, from anywhere, for any occasion! http://thewishzone.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Seperating Application server and Database server
Ratheesh K J wrote: Hello all, Currently our application and MySQL server are on the same machine. When should these be seperated? When: - your performance is dropping, and - you have identified that your bottleneck is CPU usage, and - both your MySQL server and your application server are fighting for CPU usage at the same time, and - you can't add more CPUs If any of the above don't apply, then you should be doing something else instead - maybe increasing your RAM or upgrading your SCSI disks. What are the main reasons that we should be having a seperate DB server? Performance. And keep in mind that communication between MySQL and your application server will be *considerably* faster when they're both on the same system. If you put them on separate systems, obviously communication between the 2 will now be over the network. -- Daniel Kasak IT Developer NUS Consulting Group Level 5, 77 Pacific Highway North Sydney, NSW, Australia 2060 T: (+61) 2 9922-7676 / F: (+61) 2 9922 7989 email: [EMAIL PROTECTED] website: http://www.nusconsulting.com.au -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]