Memory Woes

#1
I have a vps-Lca plan with 256mb of memory and cpanel.
We have about 30 e-mail addresses, and unfortunately we DO need a spam filter, aka SpamAssassin. I know SpamAssassing is a resourse hog, but I don't know of any other options. The site itself is php/mysql driven with a zencart back-end. Zencart itself runs fine on the most basic shared hosting environments. I do not believe it is related to my problem.

I am constantly at 85-100% memory usage. Lately it's been 90-100%

Knownhost support has been helpful and tried a number of things like limiting child threads (?) in spamassassin and some mysql optimization.

However, these have not helped in long run. I know I can expand on memory, but I would like to exhaust all other options first. I have read all the threads on this site in relation to memory, but I still must be missing something or I just don't know what affects what.

My cpu load is nil. The site is itself is pretty much just an online catalog of our products. No customer login/purchasing at this time.

No reseller accounts. Stats turned off.

I am new to VPS and still learning how to setup and optimize the system.

I know that I may need to upgrade memory, but I'd like to better understand WHY this is necessary. Is mail management really so resource heavy? Are 30 e-mails really too many?

What else can I do to?

-cj
 

Dan

Moderator
#2
Hello chaddro,

What does top say is consuming memory? It's been a long time since I used SA but it didn't use all of my VPSs memory, I would remember that.
 
#3
Here is what top is giving me at the moment. Memory is about 85%

I have seen spamd hit 35% (?!?!?) when I was at 100%. Could this be related to Outlook in some way? Like it is querying for mail too often or keeping a connection open?
 

Attachments

#4
You might want to post a screenshot in higher resolution by using imageshack etc.

I have personally never used Spamassassin in my VPS because the last thing I want is it consuming too many resources. I would rather receive bunch of spam then have my sites slow to a crawl.
 
#5
You might want to post a screenshot in higher resolution by using imageshack etc.

I have personally never used Spamassassin in my VPS because the last thing I want is it consuming too many resources. I would rather receive bunch of spam then have my sites slow to a crawl.

Ah, sorry 'bout that. I didn't know it would get further shrunk on upload.
Here is another shot:

http://chicagophoto.net/top.gif

I need to wait till I'm cranking at 100% and do another. I have seen spamd hit 39%!!! But it usually is around 9% or so.

We really do need spam management. Some accounts were receiving 100+ spam junk a day! Is there no other option than using a separate service to handle mail? Having our own mail server was one of the factors in choosing a VPS. Is SpamAssassin the only option we have?

I'll post another "top" when I see memory redline next.
 
#6
One other question... What is "normal" memory usage on a 256mb vps-L?

Our cpu usage is pretty low. It really only registers when a bot is crawling the site, or when I run an e-mail campaign with Interspires Email Marketer 5 software.

Ack... I shouldn't have neglected UNIX for so long :cool:
 

Dan

Moderator
#7
Chaddro,

That can't be the whole list, make sure the window's open all the way. Actually maybe a ps aufx would be even better. Can cut it to a file and attach the file here (ps aufx > ps.txt)

My memory usage normally runs around 60-70% but that is with ASSP and ClamAV not SA. ClamAV is horrible for memory usage too and will sometimes between the two it will spike to max out ram usage and I will have to restart them.
 
#8
Chaddro,

That can't be the whole list, make sure the window's open all the way. Actually maybe a ps aufx would be even better. Can cut it to a file and attach the file here (ps aufx > ps.txt)

Hi Dan. I waited until I hit 90+ again and created the ps.txt file on the root of the server. But now I cannot figure out how to get the darn thing. Every time I try to log in via ftp it will only let me login to the cpanel sub account, not the main.

How do I get the ps.txt file off the server?
 

Dan

Moderator
#9
Hi chaddro,

First you need an FTP client capable of sFTP such as Filezilla.

Then set up a connection to connect to your server (host name or main IP) using servertype SFTP and set the port number to 2200 and log in using root and your root password. That should give you FTP access to all files on your server.
 

Dan

Moderator
#11
Not trying to sound smart or anything but I think its better to not post that port number publicly.
Adding my 2 cents for WinSCP for a ftp, sftp client.
Hello rezag,

It's in various places through the forums and support areas such as here.

WinSCP is another one, yes, but (in prior versions anyways) it proved to be significantly slower than Filezilla.
 
#12
Thanx Dan, I didn't realize its public, always thought one of the major reasons to do it was so it is not public. That makes my post worth even less than 2 cents lol.

My experience with WinSCP vs Filezilla is the opposite of yours, but around the net Filezilla gets better reviews so you are more likely right.
 
#13
Actually, I am on a Mac ... so I was using CyberDuck. My problem was I was using ftps not sftp... :rolleyes:

Okay, here is the output from ps aufx. It's not the one from when I was over 90% cause I somehow managed for frag that one. But this one is like 87%.

http://www.chicagophoto.net/knownhost/ps.txt

I appreciate the help and input and also what you guys might suggest. Of course, a memory upgrade would "solve" the issue, but for me it is more about understanding what is going on and why.

So, currently we have about 30 e-mail addresses. 5 of those deal internationally with manufacturers overseas, and for some reason get pounded with spam (100+ a day with out spamassassin). I didn't see
a way to limit spamassassin to just the problem accounts.

I'm sure MySQL could be optimized further. I've seen usage up on that.

Thanks for looking.
 
#16
Ditto on httpd, adding them up I see 125mb being used.

Do you use mod_security with custom rules?
Hi Dan,

I had notice that httpd was pretty hungry.
Spamd has gone "nuts" on a few occations and hit 35%!

I don't know anything about mod_security with custom rules.

I have tried to tweak mysql some, but am very noobish on this subject also.

In the near future, I hope the open our website up to allow our customers to login and submit their orders online. It's capable now, but convincing "da boss" is the real issue. We are a wholesale distributor and only sell to re-distributors. So we have a limited customer base of about 3500. I would estimate at most 30 or so being on the website at one time (based on how calls to customer service run).

Having 20-30 users on at once will I'm sure make things interesting...
 

Dan

Moderator
#17
Well, I do not have experience running shopping carts and SSL certs but I can't believe that doing so would cause Apache to grow by that much. Each of my Apache children run 2.3 or 2.4% for a total of 23.2mb.

I would say to take a look at your Apache compile and get rid of the modules you don't need.

I do not know that you'll be able to get SA down lower than it is now.
 
#18
I would say to take a look at your Apache compile and get rid of the modules you don't need.

I do not know that you'll be able to get SA down lower than it is now.
Thanks for taking a look. I think I've disabled most of what I know to in webhost manager.
 
#20
Actually, I haven't managed to change anything more since I started this thread. I did do a lot of research first hand and deactivated from within the webhost manager what I understood (like awstats) and knownhost support made several adjustments (like spamd children and some changes to mysql) that did help.

I did notice that mysql seems to be installed pretty "basic" out of the box without any tweaking/optimizing (correct me if I'm wrong) ... but I think more can be done here. I do not think it's zencart per say as it's know to run quite well on basic shared hosting environments, but I'm sure there are things that can be done.

Do you run APC or any other php accelerator?

I actually want to move toward the Magento shopping cart, but this is known to still have memory management issues. Lots of features thought out of the box.

Thanks again for the help.
 
Top