Learning While Aging

SMTP service cause high CPU usage

Last week when I was debugging some application, I suddenly noticed that my computer was getting slow. So I opened Task Manager, and to my surprise, my CPU usage was about 60%! My first thought was that there must be some bad process holding up my resources, but I was too lazy to find out which process was the “bad” guy and I took a very non-savvy approach to fix this issue: reboot.

High CPU Usage

So I rebooted my computer and opened Task Manager to check if the CPU usage was back to normal. Guess what, it was still about 60%! OK, I need to be serious about this issue. After some research on the process list in Task Manager, I found that the process inetinfo.exe was using a lot of CPU. What is doing? Have I been hacked? To confirm that it was the process inetinfo.exe caused high CPU usage, I stopped the IIS Admin service. As soon as I stopped the service, the CPU usage dropped to about 5%. However, when I restarted the IIS Admin service, the CPU usage climbed back to 60%. So the inetinfo.exe was the “bad” guy. But what was doing?

After banging my head against the wall hundreds of times, I finally found out that it was the SMTP service caused the problem. Why? My computer is on a domain and our domain policy has disabled SMTP service sending emails to outside domains. The application that I was debugging sends emails to outside domains, and those emails are put in the SMTP queue, and SMTP service tries very hard to send out those queued emails which takes a lot of CPU. Every time I reboot my computer, the SMTP service will automatically check its queue and try again sending those emails. So I stopped the SMTP service and cleared the email queue manually, then restarted the SMTP service. After that, my CPU usage dropped to about 2%!

Normail CPU Usage

0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x