store | blogs | forums | twitter | facebook | wiki | mailing lists | downloads | support portal
Atomic Secure Linux
It is currently Sat May 25, 2013 11:06 am

» Feed - Atomicorp

All times are UTC - 5 hours [ DST ]




Post new topic Reply to topic Share/Bookmark  [ 20 posts ]  Go to page Previous  1, 2
Author Message
 Post subject: Re: ASL - Heavy MySQL Load
Unread postPosted: Wed Apr 11, 2012 12:46 pm 
Offline
Forum Regular
Forum Regular

Joined: Sat Dec 11, 2004 2:33 pm
Posts: 195
Location: South Africa
Since the last update my CPU load has returned normal

I did however, spend allot of time disabling logging for certain event id's (mainly below 3)
In my case, SPAMDYKE generated a ton of entries on my server for DENIED_RDNS_MISSING
Disabling logging for ID - 103501 - reduced the data table growth considerably.

ASL DB is much lighter, only 1,312,333 rows across all tables & size is 175MB (from 11.2GB)

_________________
Mark Brindley
2Large Networks - Web solutions that work


Top
 Profile  
 
 Post subject: Re: ASL - Heavy MySQL Load
Unread postPosted: Wed Apr 11, 2012 12:49 pm 
Offline
Forum Regular
Forum Regular

Joined: Mon Oct 29, 2007 6:51 pm
Posts: 606
if you applied the most recent yum update then you got an addition to your table of the creation of the new indexes which in my case took the slowest query tortix did 35% of the time and took it from 90 seconds down to .5 seconds. This will greatly reduce disk IO and cpu usage, and if you tune mysql to have thread/query/table caching it will increase performance even more and reduce cpu.


Top
 Profile  
 
 Post subject: Re: ASL - Heavy MySQL Load
Unread postPosted: Wed Apr 11, 2012 12:58 pm 
Offline
Atomicorp Staff - Site Admin
Atomicorp Staff - Site Admin

Joined: Wed Dec 31, 1969 8:00 pm
Posts: 7429
Location: earth
Note, it would only add them for new installs. Updating existing databases hasnt been finished yet.


Top
 Profile  
 
 Post subject: Re: ASL - Heavy MySQL Load
Unread postPosted: Wed Apr 11, 2012 1:18 pm 
Offline
Forum Regular
Forum Regular

Joined: Sat Dec 11, 2004 2:33 pm
Posts: 195
Location: South Africa
scott wrote:
Note, it would only add them for new installs. Updating existing databases hasnt been finished yet.


Is there a way to do it manually for now?

_________________
Mark Brindley
2Large Networks - Web solutions that work


Top
 Profile  
 
 Post subject: Re: ASL - Heavy MySQL Load
Unread postPosted: Wed Apr 11, 2012 1:23 pm 
Offline
Forum Regular
Forum Regular

Joined: Mon Oct 29, 2007 6:51 pm
Posts: 606
You can do this
Code:
mysql -uadmin -p`cat /etc/psa/.psa.shadow ` tortix -Ns -e "create index timeid on alert (timestamp, id);";



You probably want to change your max packet size as well in the /etc/my.cnf file and enable caching
Code:
query_cache_size=16M
key_buffer_size=64M
thread_cache_size=12
table_cache=256
table_open_cache=256
query_cache_limit=64MB
max_allowed_packet = 128M


Then change the chunk size in the rotate script to match the max allowed packet
Code:
perl -pi -e 's/chunk_size=1000/chunk_size=128000/gi' /var/asl/bin/asl_db_rotate


Kill of any rotate scripts that are running - some of our boxes had instances of this script running for a week or even two, with a new one spawning up each night as part of the cron jobs, which didnt really help much for CPU or mysql
Code:
kill -9 `ps aux | grep rotate | grep -v grep | awk '{print $2}'`


and restart mysql
Code:
service mysqld restart


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic Share/Bookmark  [ 20 posts ]  Go to page Previous  1, 2

» Feed - Atomicorp

All times are UTC - 5 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group