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: cpu user nice system irq
softirq iowait idle
total 2.9% 0.0% 0.2% 0.0% 0.0%
10.9% 85.8%
cpu00 1.8% 0.0% 0.6% 0.0% 0.2%
2.0% 95.4%
cpu01 4.0% 0.0% 0.2% 0.0% 0.0%
19.8% 76.0%
cpu02 5.8% 0.0% 0.0% 0.0% 0.0%
2.4% 91.8%
cpu03 0.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 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]