Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > Server Operation

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 27th July 2007, 14:57
Aldert Aldert is offline
Junior Member
 
Join Date: Jul 2007
Posts: 20
Thanks: 1
Thanked 0 Times in 0 Posts
Thumbs down Dkfilter's children consuming 125 Mb memory

Hi all,

Very simple and short question. After I followed the howto on domainkeys and did some googling I managed to get it working. But now when I do top and sort it by % of memory usage there are 6 dkfilter.in and 6 dkfilter.out children. Summing the percentages gives a usage of about 30%, equivallent to about 125 megs of my RAM!

How to reduce the usage? Why should there be 6 children alive? How to reduce it to like 1 or 2? There is not many mail coming in, so that much children are not needed?

(this issue has not been, well, issued before)

TIA and B/R from the 'windy' Netherlands,
Aldert Berends
Reply With Quote
Sponsored Links
  #2  
Old 28th July 2007, 11:01
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,748 Times in 2,579 Posts
Default

Is the number ofchildren set somewhere in your dkfilter init script (or the scripts included in there)?
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #3  
Old 29th July 2007, 21:33
Aldert Aldert is offline
Junior Member
 
Join Date: Jul 2007
Posts: 20
Thanks: 1
Thanked 0 Times in 0 Posts
Default

Hello Falko!

Hmm, none that I can see of:
Code:
case "$1" in
	start-in)
		echo -n "Starting inbound DomainKeys-filter (dkfilter.in)..."

		# create directory for pid files if necessary
		test -d $PIDDIR || mkdir -p $PIDDIR || exit 1

		# start the filter
		$DKFILTER_IN_BIN $DKFILTER_COMMON_ARGS --pidfile=$DKFILTER_IN_PID $DKFILTER_IN_ARGS
		RETVAL=$?
		if [ $RETVAL -eq 0 ]; then
			echo done.
		else
			echo failed.
			exit $RETVAL
		fi
		;;
dkfilter.in does not say to start more children, so far I can see.

I currently have no knowledge on C++ and moreover not on apache's variables and parameters...
Reply With Quote
  #4  
Old 30th July 2007, 18:31
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,748 Times in 2,579 Posts
Default

Can you post the full init script?
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #5  
Old 30th July 2007, 22:43
Aldert Aldert is offline
Junior Member
 
Join Date: Jul 2007
Posts: 20
Thanks: 1
Thanked 0 Times in 0 Posts
Default

Code:
#!/bin/sh
#
# Copyright (c) 2005-2006 Messiah College.
#
### BEGIN INIT INFO
# Default-Start:  3 4 5
# Default-Stop:   0 1 2 6
# Description:    Runs dkfilter
### END INIT INFO

DKFILTERUSER=dkfilter
DKFILTERGROUP=dkfilter
DKFILTERDIR=/usr/local/dkfilter

HOSTNAME=`hostname -f`
DOMAIN=aerotronic.nl
DKFILTER_IN_ARGS="
	--hostname=$HOSTNAME
	127.0.0.1:10025 127.0.0.1:10026"
DKFILTER_OUT_ARGS="
	--keyfile=$DKFILTERDIR/private.key
	--selector=m1
	--domain=aerotronic.nl,aerotronicvds.jronline.nl
	--method=nofws
	--headers
	127.0.0.1:10027 127.0.0.1:10028"

DKFILTER_COMMON_ARGS="
	--user=$DKFILTERUSER
	--group=$DKFILTERGROUP
	--daemonize"

DKFILTER_IN_BIN="$DKFILTERDIR/bin/dkfilter.in"
DKFILTER_OUT_BIN="$DKFILTERDIR/bin/dkfilter.out"

PIDDIR=$DKFILTERDIR/var/run
DKFILTER_IN_PID=$PIDDIR/dkfilter_in.pid
DKFILTER_OUT_PID=$PIDDIR/dkfilter_out.pid

case "$1" in
	start-in)
		echo -n "Starting inbound DomainKeys-filter (dkfilter.in)..."

		# create directory for pid files if necessary
		test -d $PIDDIR || mkdir -p $PIDDIR || exit 1

		# start the filter
		$DKFILTER_IN_BIN $DKFILTER_COMMON_ARGS --pidfile=$DKFILTER_IN_PID $DKFILTER_IN_ARGS
		RETVAL=$?
		if [ $RETVAL -eq 0 ]; then
			echo done.
		else
			echo failed.
			exit $RETVAL
		fi
		;;

	start-out)
		echo -n "Starting outbound DomainKeys-filter (dkfilter.out)..."

		# create directory for pid files if necessary
		test -d $PIDDIR || mkdir -p $PIDDIR || exit 1

		# start the filter
		$DKFILTER_OUT_BIN $DKFILTER_COMMON_ARGS --pidfile=$DKFILTER_OUT_PID $DKFILTER_OUT_ARGS
		RETVAL=$?
		if [ $RETVAL -eq 0 ]; then
			echo done.
		else
			echo failed.
			exit $RETVAL
		fi
		;;

	stop-in)
		echo -n "Shutting down inbound DomainKeys-filter (dkfilter.in)..."
		if [ -f $DKFILTER_IN_PID ]; then
			kill `cat $DKFILTER_IN_PID` && rm -f $DKFILTER_IN_PID
			RETVAL=$?
			[ $RETVAL -eq 0 ] && echo done. || echo failed.
			exit $RETVAL
		else
			echo not running.
		fi
		;;
	stop-out)
		echo -n "Shutting down outbound DomainKeys-filter (dkfilter.out)..."
		if [ -f $DKFILTER_OUT_PID ]; then
			kill `cat $DKFILTER_OUT_PID` && rm -f $DKFILTER_OUT_PID
			RETVAL=$?
			[ $RETVAL -eq 0 ] && echo done. || echo failed.
			exit $RETVAL
		else
			echo not running.
		fi
		;;
	start)
		$0 start-in && $0 start-out || exit $?
		;;
	stop)
		$0 stop-in && $0 stop-out || exit $?
		;;
	restart)
		$0 stop && $0 start || exit $?
		;;
	status)
		echo -n "dkfilter.in..."
		if [ -f $DKFILTER_IN_PID ]; then
			pid=`cat $DKFILTER_IN_PID`
			if ps -ef |grep -v grep |grep -q "$pid"; then
				echo " running (pid=$pid)"
			else
				echo " stopped (pid=$pid not found)"
			fi
		else
			echo " stopped"
		fi
		echo -n "dkfilter.out..."
		if [ -f $DKFILTER_OUT_PID ]; then
			pid=`cat $DKFILTER_OUT_PID`
			if ps -ef |grep -v grep |grep -q "$pid"; then
				echo " running (pid=$pid)"
			else
				echo " stopped (pid=$pid not found)"
			fi
		else
			echo " stopped"
		fi
		;;
	*)
		echo "Usage: $0 {start|stop|restart|status}"
		exit 1
		;;
esac
Thanks for your time!
Reply With Quote
  #6  
Old 31st July 2007, 15:45
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,748 Times in 2,579 Posts
Default

Hm, there's no indication why it starts six children for dkfilter.in and another six for dkfilter.out...
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #7  
Old 1st August 2007, 00:48
Aldert Aldert is offline
Junior Member
 
Join Date: Jul 2007
Posts: 20
Thanks: 1
Thanked 0 Times in 0 Posts
Default

Indeed. Well, just a printscreen with the output of top a certain time:



After the following:
Code:
-bash-3.00# /etc/init.d/dkfilter status
dkfilter.in... running (pid=2584)
dkfilter.out... running (pid=2593)
-bash-3.00# /etc/init.d/dkfilter stop
Shutting down inbound DomainKeys-filter (dkfilter.in)...done.
Shutting down outbound DomainKeys-filter (dkfilter.out)...done.
-bash-3.00# /etc/init.d/dkfilter start
Starting inbound DomainKeys-filter (dkfilter.in)...running
done.
Starting outbound DomainKeys-filter (dkfilter.out)...running
done.
Still 6 children, with new pids of course. May be it is a good idea ask the designer to take a look at it?
Reply With Quote
  #8  
Old 1st August 2007, 20:06
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,748 Times in 2,579 Posts
 
Default

Quote:
Originally Posted by Aldert
May be it is a good idea ask the designer to take a look at it?
Yes, I think he can explain it.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Ispconfig and Virtuemart shajazzi Installation/Configuration 7 21st February 2006 21:25


All times are GMT +2. The time now is 07:12.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.