Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 08 Sep 2000 08:42:33 -0400
From:      John <papalia@udel.edu>
To:        cjclark@alum.mit.edu
Cc:        freebsd-questions@FreeBSD.ORG
Subject:   Re: Is stunnel supposed to be a resource hog?
Message-ID:  <4.3.1.2.20000908083001.00adf200@mail.udel.edu>
In-Reply-To: <20000907233045.I69158@149.211.6.64.reflexcom.com>
References:  <4.3.1.2.20000907203820.00ac0290@mail.udel.edu> <4.3.1.2.20000907203820.00ac0290@mail.udel.edu>

next in thread | previous in thread | raw e-mail | index | archive | help

> > Hey all,
> >
> > So, with stunnel doing the 'fronting' for my imap and pop3 servers for the
> > past couple of weeks, I just took a glance at the system resources via
> > "top".  I get the results below.  It doesn't seem right to me though that
> > stunnel should be taking up so much of the system's time?
> >
> > Thanks in advance,
> > John
> >
> > Last pid: 29422;  load averages:  3.01,  3.04,  3.01  up
> > 22+22:36:14    20:43:49
> > 56 processes:  4 running, 51 sleeping, 1 zombie
> >
> > Mem: 34M Active, 30M Inact, 20M Wired, 4000K Cache, 19M Buf, 3764K Free
> > Swap: 160M Total, 7456K Used, 153M Free, 4% Inuse
> >
> >
> >    PID USERNAME  PRI NICE  SIZE    RES STATE    TIME   WCPU    CPU COMMAND
> > 61565 root       59   0  1984K    76K RUN     45.4H 32.67% 32.67% stunnel
> > 61567 root       59   0  1984K    76K RUN     45.5H 32.62% 32.62% stunnel
>
>What the heck would it be fronting for that has been running for 45.5
>hours? stunnel can eat CPU at startup when generating keys for the
>session. Once it gets going, it should not use too much CPU, and then
>it should only be using CPU when there is information being
>transfered. What's been sending info for 45.5 hours of CPU?

Well, that's what has me totally confused.  I have stunnel starting via the 
provided stunnel.sh script in /usr/local/etc/rc.d which pretty much only 
comes down to being:

stunnel -d 993 -p /usr/local/etc/stunnel.pem -l /usr/local/libexec/imapd impad
stunnel -d 995 -p /usr/local/etc/stunnel.pem -l /usr/local/libexec/ipop3d 
ipop3d

That's it. Nothing more.

> > system's (P-90) info is as follows:
>
>Whoo. I hope you aren't serving too many people. Looks like you have
>64 MB? That actually might be yuor biggest problem if you get lots of
>IMAP and stunnels resident on the system at once.

At the moment, I have only 12 users, of which only 3-4 would be interested 
in checking mail - this server is my 'test bed'.  I checked the log files 
and the last time anyone actually checked their mail was this past tuesday 
(3 days ago).  So, given that the mail daemons aren't even taking any hits, 
I'm stumped as to what's going on?

Although, I think I might have found *something*... I've been having the 
problem that sometimes when a user would check mail, it would leave behind 
a zombie process. So, at the end of a day, with someone checking their mail 
every 10 minutes, I might end up with 100+ zombies. Searching the mail 
archives yielded the info that killing the parent process would get rid of 
the zombie children.  So, what I did was set up a cron job to every night 
kill off the mail servers and then restart them again.  It worked 
great.  Reviewing the message logs though, I'm finding out now that it 
worked great for a few days, then started generating the message:

Sep  3 11:01:38 merlin stunnel[75588]: Using 'impad' as tcpwrapper service name
Sep  3 11:01:39 merlin stunnel[75588]: stunnel 3.8p4 on i386--freebsd4.1 
PTHREAD
+LIBWRAP
Sep  3 11:01:39 merlin stunnel[75590]: Using 'ipop3d' as tcpwrapper service 
name
Sep  3 11:01:39 merlin stunnel[75589]: bind: Address already in use (48)
Sep  3 11:01:43 merlin stunnel[75590]: stunnel 3.8p4 on i386--freebsd4.1 
PTHREAD
+LIBWRAP
Sep  3 11:01:43 merlin stunnel[75591]: bind: Address already in use (48)

Not having seen this before, I'm wondering if this is what is causing the 
problems?  I just killed off the stunnel/mail processes and restarted them 
again, and everything seems to be ok.  I guess I won't know for sure until 
later today to see if the load raises.

Thanks muchly for your help,
John



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4.3.1.2.20000908083001.00adf200>