Solved

Linux Server Load

Posted on 2006-07-09
2
144 Views
Last Modified: 2013-12-16
Couple of questions about Linux's ability to handle tasks.

I've created a simple cron job (2KB) in Perl that reads a directory on my server every 1 minute, sorts, and deletes the old files.  Does this sort of cronjob, one that executes every minute, put a lot of strain on the server? It's a small cronjob, so my assumption is it's no sweat to the server.

If I send a batch of e-mails (no more than 20) at one time using qmail, why does it take some e-mails longer than others to arrive at their destination?  Some e-mails arrive in a few minutes -- others can take several hours.  Again, using Perl to send the e-mails.  Is this most likely a qmail issue or an issue related to the user's inbox?


Thanks in advance!
$marc
0
Comment
Question by:marcparillo
2 Comments
 
LVL 22

Accepted Solution

by:
pjedmond earned 125 total points
ID: 17068783
You can get a 2KB perl script written that starts trying to calculat PI or something else to 50 million decimal places, and it will most probably bring most servers to their knees if you do not monitor what is happening. Imagine that the main process takes 1 year to complete. Every minute anotehr process starts, and by the end of the year.....you get the idea.

You need to monitor processor useage:

top

is useful. If it is using too much processing power, then use nice to reduce the amount of processing that the task takes up:

man nice

for more details. You'll then get a better idea of how much processing the task uses.

With respect to email delivery. Most emails will get delivered to the MX server responsible for the domain concerned fairly quickly. At this point, some domains will have a task that runs every say 5 minutes to collect mail and store them on a local server. Other domains may run this server every hour. You then have the user. Some have automated checks for new emails every minute, others every 30 minutes. Allow for a few transfer failures that have to be repeated, and as a result, delivery times vary.

(   (()
(`-' _\
 ''  ''

0
 
LVL 3

Author Comment

by:marcparillo
ID: 17069026
Thank you --
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

I am a long time windows user and for me it is normal to have spaces in directory and file names. Changing to Linux I found myself frustrated when I moved my windows data over to my new Linux computer. The problem occurs when at the command line.…
How many times have you wanted to quickly do the same thing to a list but found yourself typing it again and again? I first figured out a small time saver with the up arrow to recall the last command but that can only get you so far if you have a bi…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now