Previous Thread
Next Thread
Print Thread
Hop To
#231862 12/08/2009 12:29 AM
Joined: Oct 2006
Posts: 358
enthusiast
enthusiast
Joined: Oct 2006
Posts: 358
I had a performance problem a while back on a shared Windows service. I bit the bullet and moved to a VPS (Virtual Private Server) on Linux where I have full control and root access.

I saw immediate improvement which lasted for about a month. Now I'm getting occasional slowdowns. Checking the logs tonight I see the following:

Dec 08, 2009 07:08:57 AM Yellow zone kmemsize
Dec 08, 2009 06:59:57 AM Green zone oomguarpages
Dec 08, 2009 06:58:57 AM Red zone oomguarpages
Dec 08, 2009 06:57:57 AM Yellow zone oomguarpages

At one point this past weekend, I couldn't FTP in and the MySQL calls were taking a long, long time. I fixed that finally by restarting the Virtuozzo "container".

The Host company sent me their analysis:
"... the Top3 processes which were using the most of RAM:
mysqld 124M
httpd 81M
spamd 72M ....

QUESTION: What can I do to tune this new environment? or what else do I need to evaluate. (Thanks in advance.)


kmemsize
The size of unswappable kernel memory allocated for the internal kernel structures for the processes of a particular Container.

oomguarpages
The out-of-memory guarantee, in pages. Any Container process will not be killed even in case of heavy memory shortage if the current memory consumption (including both physical memory and swap) does not reach the oomguarpages barrier.


--BIll B
Joined: Apr 2007
Posts: 3,940
Likes: 1
SD Offline
Former Developer
Former Developer
Joined: Apr 2007
Posts: 3,940
Likes: 1
mysqltuner.pl Linky Poo is what i use.. it is very handy wink

Joined: Oct 2006
Posts: 358
enthusiast
enthusiast
Joined: Oct 2006
Posts: 358
That looks really cool... But dang it, Now I need to install Perl. Haven't run that in about 4 or 5 years. Ha. Some things you never get away from.... except ADA... finally lost connection to that winner. Ha. A new government standard! BS.

Okay, I'll work on this over the next couple of days. Thanks Sirdude.


--BIll B
Joined: Jul 2006
Posts: 2,143
Pooh-Bah
Pooh-Bah
Joined: Jul 2006
Posts: 2,143
Bill? Spam Assassin was running at 72 megs? It is not not not the root of the problem, but nonetheless it caught my eye as that's too much. Is it up to date? Is the bayes_seen really really large? 72 megs and (likely) a whole lot of CPU is just too high for Spam Assassin.

(by the way, if you have Spam Assassin installed then you have perl installed)


This thread for sale. Click here! [Linked Image from navaho.infopop.cc]
Joined: Oct 2006
Posts: 358
enthusiast
enthusiast
Joined: Oct 2006
Posts: 358
Just so I understand you clearly, you think that Spam Assassin is "not" the problem? :-) haha smile grin

This weekend I was asked to redirect one of the three mail accounts on this server to a different email service. I was thinking of disabling Spam Assassin (since it's one of the top three memory hogs) but based upon your note, that's probably not necessary... ?

(Thanks for the perl tip. I just haven't had time to look yet, but I'll try to install Sirdude's suggestion tonight.)


--BIll B
Joined: Apr 2007
Posts: 3,940
Likes: 1
SD Offline
Former Developer
Former Developer
Joined: Apr 2007
Posts: 3,940
Likes: 1
i never enable spam assassin

Joined: Jun 2006
Posts: 16,299
Likes: 116
UBB.threads Developer
UBB.threads Developer
Joined: Jun 2006
Posts: 16,299
Likes: 116
I don't even use mail on my server; I figure, my own single server can't give me the type of redundancy that the Google Apps mail service can (and they even have a free service here)...

So I don't even have to worry about keeping my spam lists up to date, or ssl certificates, or worry about making sure that imap/php3/smtp/spamassassin daemons aren't going out of control with process or memory usage...


I am a Web Development Contractor, I do not work for UBBCentral. I have provided free User to User Support since the beginning of these support forums.
Do you need Forum Install or Upgrade Services?
Forums: A Gardeners Forum, Scouters World
UBB.threads: UBBWiki, UBB Styles, UBB.Sitemaps
Longtime Supporter & Resident Post-A-Holic
VNC Web Services: Code Modifications, Upgrades, Styling, Coding Services, Disaster Recovery, and more!
Joined: Jul 2006
Posts: 2,143
Pooh-Bah
Pooh-Bah
Joined: Jul 2006
Posts: 2,143
spam assassin is running on this server. It's on all of our hosting servers. I like it. Between that and spam sieve which is on my mac I almost never have spam in my in box. All 3 to 5 thousand a day go into the spam folder. That's a lot of spam.

Bill, it is written in perl, thus my assurance to you that if it is installed and running you have perl.

I do have a concern that it is sucking up that much memory. You'll want to look at that when you get a chance. Either it is an old version, the config file has something odd in it, or the bayes_seen is unrealistically large. And of course, if you aren't doing mail on that server then of course just shut it down. Something to think about when you have time.


This thread for sale. Click here! [Linked Image from navaho.infopop.cc]
Joined: Oct 2006
Posts: 358
enthusiast
enthusiast
Joined: Oct 2006
Posts: 358
Dave,
I'm still struggling with my memory issues -- after 3 months. Any chance that you can see something in these screen shots?

The host is telling me that I need more memory. But we moved from a shared to VPS service in October so that we'd have full memory access. I'm not willing to pay YET ANOTHER upgrade for more memory until they figure out the "cause".

Our current plan is called
GOLD VPS with 256 MB Ram, 1024 MB burstable Ram
The next plan up is
PLATINUM with 512 MB Ram, 2048 MB burstable Ram

On this one server I run the following:

  • UBB Threads (approx 8,000 users)
  • 4 small MySQL databases
  • One Web site
  • Two domains, one is just a redirect.
  • Email service for 3 accounts.


That's it... No big applicaton hogs.

I appreciate any ideas or help. Thanks!!


[Linked Image from barkerville.net]

[Linked Image from barkerville.net]


--BIll B
Joined: Apr 2007
Posts: 3,940
Likes: 1
SD Offline
Former Developer
Former Developer
Joined: Apr 2007
Posts: 3,940
Likes: 1
what is the size of the total of your .MYI files? 8000 users should prolly generate a lot of posts..

phpmyadmin can tell you the size of that (indices overhead)

Joined: Oct 2006
Posts: 358
enthusiast
enthusiast
Joined: Oct 2006
Posts: 358
myisam data pointer size 6
myisam max sort file size 9,223,372,036,853,727,232
myisam recover options OFF
myisam repair threads 1
myisam sort buffer size 8,388,608
myisam stats method nulls_unequal


--BIll B
Joined: Oct 2006
Posts: 358
enthusiast
enthusiast
Joined: Oct 2006
Posts: 358
I don't know if that is exactly what you were looking for.

I found two more measures that are showing "red":

Table_locks_waited 168
The number of times that a table lock could not be acquired immediately and a wait was needed. If this is high, and you have performance problems, you should first optimize your queries, and then either split your tables...

Handler_read_rnd_next 17 M
The number of requests to read the next row in the data file. This is high if you are doing a lot of table scans. Generally this suggests that your tables are not properly indexed or that your queries are not written to take advantage of the indexes you have.


--BIll B
Joined: Oct 2006
Posts: 358
enthusiast
enthusiast
Joined: Oct 2006
Posts: 358
ahhh... one more that looks suspicious:

Select_full_join 142
The number of joins that do not use indexes. If this value is not 0, you should carefully check the indexes of your tables.


--BIll B
Joined: Jun 2006
Posts: 9,242
Likes: 1
R
Former Developer
Former Developer
R Offline
Joined: Jun 2006
Posts: 9,242
Likes: 1
Are you logging slow queries at all? Might be useful to see if there are any taking too much time.

Joined: Oct 2006
Posts: 358
enthusiast
enthusiast
Joined: Oct 2006
Posts: 358
Thanks Rick for the idea.

I don't know exactly where to look for that info.

From the UBB log file I see a lot of these:

Script: - Line: Unable to connect to the database! - Can't create UNIX socket (12)

Script: - Line: Unable to connect to the database! - Can't create a new thread (errno 12); if you are not out of available memory, you can consult the manual for a possible OS-dependent bug

Is that what you're referring to? Or should I look at the Plesk log files for something specific?


--BIll B
Joined: Jan 2010
Posts: 34
newbie
newbie
Joined: Jan 2010
Posts: 34
It's actually a mysql setting. You'll need to edit the mysql configuration file, and you're looking for a line that has log-slow-queries. It's probably commented out. You can uncomment it and then any queries longer than the designated threshold will be logged to the specified file.

Are you running any other database driven software besides the forum?

Joined: Jul 2006
Posts: 2,143
Pooh-Bah
Pooh-Bah
Joined: Jul 2006
Posts: 2,143
Bill, Scott is referring to my.cnf. That's probably in /etc

And for Sir Dude's question, if you look at this database in phpmyadmin you'll see a column labeled size. Second from the right. He wants the size of the one named POSTS or ubbt_POSTS. Something _POSTS.


This thread for sale. Click here! [Linked Image from navaho.infopop.cc]
Joined: Oct 2006
Posts: 358
enthusiast
enthusiast
Joined: Oct 2006
Posts: 358
Thanks guys... Here's my info.

Yes, I have four MySQL db's running. All with very low usage.
Threads is the most active by far.

ubbt_POSTS size is 189.5 MB

Now, here's the error message that is showing up the most. It's referring to the flash header that I added to my page on January 1st.

Directory index forbidden by Options directive: /var/www/vhosts/mydomain.org/httpdocs/flash/car/


--BIll B
Joined: Oct 2006
Posts: 358
enthusiast
enthusiast
Joined: Oct 2006
Posts: 358
I found these instructions, but they don't match the wording in mysqld file.

Quote
How to log slow queries:
=========================
# vi /etc/rc.d/init.d/mysqld

Find this line:
SAFE_MYSQLD_OPTIONS="--defaults-file=/etc/my.cnf"

change it to:
SAFE_MYSQLD_OPTIONS="--defaults-file=/etc/my.cnf --log-slow-queries=/var/log/slow-queries.log"


--BIll B
Joined: Jul 2006
Posts: 2,143
Pooh-Bah
Pooh-Bah
Joined: Jul 2006
Posts: 2,143
Can you just go ahead and post your my.cnf? Blank out any passwords that might be in there. probably aren't though.

Then go into /var/www/vhosts/mydomain.org/httpdocs/flash/car/

put in an .htaccess file that contains this line

Options -Indexes


(or is it +Indexes blush ) try both, lol.


This thread for sale. Click here! [Linked Image from navaho.infopop.cc]

Link Copied to Clipboard
ShoutChat
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Recent Topics
Bots
by Outdoorking - 04/13/2024 5:08 PM
Can you add html to language files?
by Baldeagle - 04/07/2024 2:41 PM
Do I need to rebuild my database?
by Baldeagle - 04/07/2024 2:58 AM
This is not a bug, but a suggestion
by Baldeagle - 04/05/2024 11:25 PM
Is UBB.threads still going?
by Aaron101 - 04/01/2022 8:18 AM
Who's Online Now
2 members (DennyP, 1 invisible), 969 guests, and 171 robots.
Key: Admin, Global Mod, Mod
Random Gallery Image
Latest Gallery Images
Los Angeles
Los Angeles
by isaac, August 6
3D Creations
3D Creations
by JAISP, December 30
Artistic structures
Artistic structures
by isaac, August 29
Stones
Stones
by isaac, August 19
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20230217)