Ram Memory Overload, Apache, MySQL and more

contactwin

Verified User
Joined
Jun 28, 2006
Messages
15
Hello,
pardon me for being a newbie, i've researched quite a lot on all of the subjects i have queries upon, a few to which i could get answers/figured out the problem.

Here are somethings i couldnt figure out

-------------
My server Config
Processor Name Intel(R) Pentium(R) 4 CPU 2.80GHz
Vendor ID GenuineIntel
Processor Speed (MHz) 2792.138
Total Memory 1032340 kB
OS: RedHat Linux 9.0
Total Swap Memory 2048276 kB
Apache 1.3.36
DirectAdmin 1.23.1
Exim 4.42
MySQL 4.0.17
Named 9.2.1
ProFTPd 1.2.9
sshd Running
vm-Pop3d 1.1.7e
---------------------
Additional Stats
# of Domains 49
# of SubDomains 8251
POP Email Accounts 19
Email Forwarders 0
Mailing Lists 0
AutoResponders
# of MySQL DBs 21

-------------------------

Side most of MySQL dbs are just testing (never used) so let's not get there

Now 1st Question,
I'm facing memory problems i'm guessing, what's happening is, when i restart apache i have around 1032340 kB free, then it keeps decreasing to around 100000 kb - 150000 kb, and the swap memory is reduced from 2048276 kB to 50kb even

This has happened on 3-4 ocassions now, when it does happen, neither will directadmin respond, nor will any other thing. Everything's a stand still...Thankfully nac.net has provided me a web url through which i can issue a soft reboot on the server.

Now i've read about checking the processes and stuff, i've done a "TOP" and everything seems normal...

What would i need to have to do? :confused: Do i need additional Memory? :( Or is it some other tweaking, i don't know where to find the log files for what process uses what resources and where so the command lines and paths to find them will be appreciated.

So what is suggested?


My 2nd Question, most of you have the default my.cnf file, any idea as to what will be best for my server config.
Also, how do i check if any of the php mysql queries are bad? where do i find them.


My 3rd Question
I saw something in a thread about mysql optimization and found this
mysqlcheck -o -u root -p --all-databases
what does this do and why is it used?
I tried logging in as root but it gave me a permission denied.

While i tried logging into SSH via the user "da_admin" it never logged me in at all, even after using the password located here
/usr/local/directadmin/scripts/setup.txt

Please Guide Me

Contactwin
 
contactwin said:
pardon me for being a newbie, i've researched quite a lot on all of the subjects i have queries upon, a few to which i could get answers/figured out the problem.
I'm going to pick and choose what I respond to, to avoid a lot of research...
Here are somethings i couldnt figure out
. . .
# of Domains 49
# of SubDomains 8251
and
Now 1st Question,
I'm facing memory problems i'm guessing, what's happening is, when i restart apache i have around 1032340 kB free, then it keeps decreasing to around 100000 kb - 150000 kb, and the swap memory is reduced from 2048276 kB to 50kb even
To apache a subdomain uses the same amount of resources as a domain. That's a lot of domains, and I think it's a wonder your server is responding at all.

Even of those subdomains aren't doing anything, loading apache is using a lot of memory.

Go to 4G or 8G, and a dual-processor system, and read everything you can find on using Apache for a large number of domains.
Now i've read about checking the processes and stuff, i've done a "TOP" and everything seems normal...
Except the memory used and the swap memory, as you posted above. The use of swap memory is probably what's slowing down your server.
While i tried logging into SSH via the user "da_admin" it never logged me in at all, even after using the password located here
/usr/local/directadmin/scripts/setup.txt
da_admin is not a standard shell login. You might want to check with whomever built your server but in general you shell in using your admin account and password, and then use su - if you need to become root.

Jeff
 
ok so i would need improved ram and all.

What makes me wonder is, there are tons of blog sites which have over lakhs of users (lakhs of sub-domains) what processors and ram do they run on.


Can you help me with info on this jlasman (jeff)
-----------------
and read everything you can find on using Apache for a large number of domains.
-----------------
 
I doubt large sites use any kind of control panel; my guess is they use custom built servers with carefully configured httpd.conf files (if they use apache at all).

A few terrabytes of drives in Network Attached Storage (NAS) or even in a Storage Area Network (SAN).

Lots of memory (8 + gigabytes or more)

Jeff
 
oh my lord.
Actually i want to upgrade but nac is gonna charge me a monthly of $20 for 1gb additional ram, wonder what it would for 4gb :(

And if i want to move my servers, i dont know how to :rolleyes: since i have all these subdomains, can i just copy some files over to the new server(if i purchase one) and the sub-domains will also be automatically configured on the new one, rather than me adding them one by one?

And with around 100gigs of data, which have been uploaded over time, i can't possibly think of data transfer, even if i was supposed to zip files and then upload, would be too much i suppose.

I suppose you provided hosting jeff, do you provide dedicated? if you do, can u pm me ur quotes for the same?
 
i did a chkrootkit and found this

Checking `bindshell'... warning, got bogus unix line.
warning, got bogus unix line.
not infected
Checking `lkm'... You have 19 process hidden for ps command
chkproc: Warning: Possible LKM Trojan installed
Checking `rexedcs'... not found
Checking `sniffer'... eth0: not promisc and no PF_PACKET sockets

anything to be bothered about? and if yes, how do i check lkm?


And rkhunter showed everything as "fine"

so i guess it's only a ram upgrade right?


Besides, how do i check if any of my website php script has bad code and hence eating up ram?
 
Back
Top