LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 12-06-2010, 09:24 AM   #1
fdelval
Member
 
Registered: Feb 2010
Posts: 107

Rep: Reputation: 15
rsync ran by crond strangles bandwidth


Hello,


I have a weird problem.
Rsync works fine if it is ran by me manually; i restrict the upload rate, and the bandwidth doesnt suffer, users and rsync may work at the same time.

But when i set crond to schedule rsync, it doesnt matter if i set the limit rate, if i use "trickle" to limit the upload or whatever, rsync uses the 100% of available bandwidth, making imposible to use the network.

In crond, i exaclty wrote the same command line i use manually which work, and i did program it every 30 minutes, so backups doesnt start before the previous finished.

I dont know what happends... ideas?

Last edited by fdelval; 12-06-2010 at 11:37 AM.
 
Old 12-07-2010, 01:38 AM   #2
Reuti
Senior Member
 
Registered: Dec 2004
Location: Marburg, Germany
Distribution: openSUSE 15.2
Posts: 1,339

Rep: Reputation: 260Reputation: 260Reputation: 260
Is it running in the essence by the same user and the same nice value?
 
Old 12-07-2010, 02:47 AM   #3
fdelval
Member
 
Registered: Feb 2010
Posts: 107

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by Reuti View Post
Is it running in the essence by the same user and the same nice value?
same user yes
about the nice value, i dont know what it is...
 
Old 12-07-2010, 04:20 AM   #4
Reuti
Senior Member
 
Registered: Dec 2004
Location: Marburg, Germany
Distribution: openSUSE 15.2
Posts: 1,339

Rep: Reputation: 260Reputation: 260Reputation: 260
Code:
man nice
The default is a value of zero for user processes. It should be the same for the processes running by a cron entry, unless you specify it explicitly.

But you can of course try to lower its priority to test it. You have to prefix the command in your cron entry by
Code:
nice -19 your_command_here
which should be a shortcut to
Code:
nice -n 19 your_command_here
and results in a priority of plus 19, i.e. the lowest possible one on Linux (on BSD it would be 20).
 
Old 12-07-2010, 04:13 PM   #5
fdelval
Member
 
Registered: Feb 2010
Posts: 107

Original Poster
Rep: Reputation: 15
mmm i dont know, i smell something bad in rsync.

Look, i tryed to synch a 2 gb file over a LAN manually, no cron.

I set --progress --bwlimit=15 because it was set in my script from the last file i put over the internet.

Guess what?
the average uploading rate was: 15MB/sec

The man page says:
--bwlimit=<rate>Kb

So i dont know what is the problem.
 
Old 12-07-2010, 05:48 PM   #6
Reuti
Senior Member
 
Registered: Dec 2004
Location: Marburg, Germany
Distribution: openSUSE 15.2
Posts: 1,339

Rep: Reputation: 260Reputation: 260Reputation: 260
Is your version accepting an unit for --bwlimit?

https://bugzilla.samba.org/show_bug.cgi?id=6881
 
Old 12-08-2010, 08:46 AM   #7
fdelval
Member
 
Registered: Feb 2010
Posts: 107

Original Poster
Rep: Reputation: 15
yes it does

to sum up:


--bwlimit=15


LAN -> 15MB/s

WAN -> 15 KB/s

WAN & cron: -> doesnt work
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
problem about using crond to execute rsync schwabeNiu Linux - Newbie 2 11-25-2010 08:27 AM
/sbin/service crond unable to start - gives permission error on /usr/sbin/crond mgervacio Linux - Newbie 6 07-16-2008 01:03 PM
rsync Bandwidth Cap? cdrom600 Linux - Software 3 02-26-2007 06:59 PM
Vsftpd - how to limit download bandwidth but unlimited upload bandwidth? mpls mikeg Linux - Software 3 08-13-2005 01:52 PM
rsync - transfer slow - bandwidth limiting? phatboyz Linux - Networking 3 01-13-2005 02:40 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 11:53 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration