Solved

Linux Server Load

Posted on 2006-07-09
2
147 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

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Using 'screen' for session sharing, The Simple Edition Step 1: user starts session with command: screen Step 2: other user (logged in with same user account) connects with command: screen -x Done. Both users are connected to the same CLI sessio…
It’s 2016. Password authentication should be dead — or at least close to dying. But, unfortunately, it has not traversed Quagga stage yet. Using password authentication is like laundering hotel guest linens with a washboard — it’s Passé.
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

808 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