PDA

Bekijk de volledige versie : priority settings ? are there any



raas
29-12-2007, 14:31
Hi,

like most of you I use my asus for storing files which are shared across the network and downloading of files (newsservers).


I have lots of audio and video stored on the asus which is used by multiple devices (xbox (xbmc), several pc's and laptops, etc)

I used the xbox/pc to listen to music/watch movies, 'streaming' from the asus.

When it is not downloading anything heavy from a newsserver this works perfectly, I can view dvds with my xbox/pc which are stored on the asus.
But when the asus is downloading (Hellanzb) it tends to skip some frames in the dvd played by xbox/pc. Not much at all (once or twice every minute), but just enough to get irritated about., it seems to me that the asus just can't handle this load, because being a bit to heavy.

So I was thinking about priorities in the asus, are there any?
Can I give samba the uppermost priority so that the dvd doesn't skip and Hellanzb doesn't get a lot of resources.. slowing down the download/verify/unpacking does not matter to me, it can pickup after the dvd is watched...

btw.. I'm starting hella with the following command (nice, should give it a lower priority (i don't know if it's true, n00b here), but do I have to start samba with a higher then?)


nice -n19 /opt/bin/hellanzb.py -D

When I was running Hellanzb without the nice option the skipping was much worse, so I know it had some effect..



I don't have any of these problems while listening to music, but that doesn't need the bandwith..

looking forward in reading your thoughts about this..


TIA

DrChair
29-12-2007, 15:43
Priority (also called niceness) can range from -20 (most priority) to 19 (least priority).
Default priority is 0.

So you could try to start smbd at a niceness of -20.



killall smbd
sleep 5
nice -n-20 /opt/sbin/smbd -D


or you could use renice:


renice -20 `pidof smbd`

raas
29-12-2007, 16:48
Hi,

Dr Chair, works like a charm! Thank you!
while playing, the movie didn't skip at all..
a great bonus is also that the responsivness in windows is much much better than it was before..

one thing though..

I've used the following code while the router was running. (didn't reboot)



killall smbd
sleep 5
nice -n-20 /opt/sbin/smbd -D


How do I set this, so after a reboot the setting is preserved..
Do I append it to the post-boot file ? or is there another way.

DrChair
29-12-2007, 17:20
How do I set this, so after a reboot the setting is preserved..
Do I append it to the post-boot file ? or is there another way.

edit the file /opt/etc/init.d/S80samba and change:

/opt/sbin/smbd -D;

into:

/opt/bin/nice -n-20 /opt/sbin/smbd -D;

raas
29-12-2007, 18:17
Dr Chair..



worked !

thanks !



one last question. is it also possible to start par2 and unrar this way from hellanzb ?
i mean, in hella's config file, you have to set a location for the par2 and unrar command, can I extend this with the nice option also ? or is this handled through the start of hellanzb with nice ?

DrChair
29-12-2007, 20:15
because you start hellanzb with a niceness of 19, all its subprocesses (including par2 and unrar) are also started with the same niceness.

raas
29-12-2007, 22:45
because you start hellanzb with a niceness of 19, all its subprocesses (including par2 and unrar) are also started with the same niceness.

Clear.
Thank you for the information, I've learned some today.

newbiefan
30-12-2007, 23:44
I have to say thks too, your hint (nice) solved my annoying (Asus destroying) problem with samba2!!

Since I start samba with nice -n-15 my router works perfectly.
I had the problem, that samba crashed my router totally, when I had more as 3 PC's with file copying at the same time. It's too much for an asus wl500gp.
Samba (my guess) is the reason that I bricked one asus totally, even the serial console was not working any more.
Now I'm able to copy with 6 PC's at the same time, nothing happen, no crash.

Man, you can't imagine, how happy you made me!
I thought, I've to install my old freenas-server again - now it's solved!!

raas
31-12-2007, 15:11
Yeah..

I must say. the samba settings really please me..
I'm happier than ever before with my asus.

responsiveness in windows is so much better, before, when I wanted to delete files on the asus (let's say 50) it did 1-2 every second.. taking up to 30-40 seconds to just delete 50 files.

Now it's just a matter of seconds before files are deleted.. I think 7-8 per second or so..

also with 'multi-user' works better like newbiefan indicated,
watch a dvd on the xbox, play music on a laptop and hella still manages to get +240kb/s when downloading.. and best of all, nothing skipps a beat.

(i think this setting should be included in the samba tutorials which are around. as I have not (just couple of days testing) encountered negative side-effects of this setting)

lordu
05-03-2008, 19:14
Hello !

i have WL500gP with the last version of Oleg firmare
I use preinstalled Demo mode samba, but it's a little bit slow

Can i do something to "renice" this samba ?
Pls, help me !

Thank you !

raas
05-03-2008, 21:54
Hi,

please define 'a little bit slow'

3 - 3.5 - 4 mbyte/sec is the absolute maximum you wil get from this device when using a usb harddisk.

if you don't get this speed.. consider samba2 or use ftp (vsftpd)
(after installing samba2 you can give it the higher priority)

pinkfloyd
05-03-2008, 22:14
raas as always you are very helpful ...

still I did not do the hellanzb on my asus since am using my laptop for downloads...

it would be nice though to share videos & music on my iphone and xbox 360

can you please make a small easy tutorial how to do this ?

Thanks again for your help

raas
06-03-2008, 08:09
Hi pinkfloyd,

kinda low relevance to the subject of this post, but nevermind, here it goes.

As I recall right you're running the headstart image, which includes all you need to do this.

Webserver and filesharing is enabled in this image.
I don't have an xbox 360, but I do have a xbox 1 (modded) with xbmc running, and it can connect to asus with absolutely no problem. the 360 should not have a problem connecting to the asus as long as it's in the same ip range.. (if your asus is in the 192.168.1.x range, than the ip of your xbox should also be in the 192.168.1.x range.)

I also don't have an iphone, but I use a htc tytn (smartphone) (with hspda-mod), which can connect to the asus easily using WiFi and share files.. And when I'm on the road I connect trough the website which is running on the asus.. (make sure you asus is accessible from the internet: NAT, portforwarding, firewall -settings, on your (broadband) modem).

HTH

QMax
06-12-2009, 20:58
How can I nice, to have higher priority, a smbd server started from xinetd (/opt/etc/xinetd.d/netbios-ssn) ?

Thanks

QMax
07-12-2009, 08:29
How can I nice, to have higher priority, a smbd server started from xinetd (/opt/etc/xinetd.d/netbios-ssn) ?

Thanks

I think I've solved simply adding a new line to /opt/etc/xinetd.d/netbios-ssn:


service netbios-ssn
{
disable = no
socket_type = stream
protocol = tcp
port = 139
user = root
wait = no
only_from = localhost 192.168.1.1/24
server = /opt/sbin/smbd
nice = -18
}


Now everytime smbd starts, from Top i can see NI -18.

Max