praganj wrote: 
> Since early versions of piCoreplayer i am using my own scripts to stop
> all procesess which are not necessary for playing music few minutes
> after boot process - httpd, udevd, udhcpc, crond, dropbear.
> In this way Pi has more ressources for squeezelite and IMHO sound
> quality with a very good usb dac and very good hifi system is better.
> 
> Would it be possible to built in one extra option for high end freaks
> into picoreplayer gui allowing to stop all unnecessary processess 5 or
> 10 minutes after booting, but only then, when there is no access to web
> gui ?
> 
> In this way it will be possible to change configuration just after
> reboot and later all possible CPU/bus ressources could be available to
> squeezelite.
> 
> In my scripts i am also unloading unused kernel modules and umounting
> unnecessary mounts, but greatest impact has stopping some unused
> services and tcpip optimization.
> 
> I don't want to start a flame war about "bits are bits" and when it is
> working, than it is working, i just have a proposition to add some "high
> end approach" to this great piece of software :)
> 
> Here is my script for Pi 2 whith usb dac  (waveio+buffalo II) :
> 
> ########################################
> # add at the end of /home/tc/www/cgi-bin/do_rebootstuff.sh
> # make backup with sudo filetool.sh -b
> 
> sleep 600
> 
> # some tcpip optimizing
> sudo sysctl -w net.core.rmem_max=26214400
> sudo sysctl -w net.core.wmem_max=26214400
> sudo sysctl -w net.ipv4.tcp_rmem='4096 1048576 26214400'
> sudo sysctl -w net.ipv4.tcp_wmem='4096 1048576 26214400'
> sudo sysctl -w net.ipv4.tcp_mem='26214400 26214400 26214400'
> sudo sysctl -w net.ipv4.route.flush=1
> sudo sysctl -w net.ipv4.tcp_no_metrics_save=1
> sudo sysctl -w net.ipv4.tcp_moderate_rcvbuf=1
> sudo sysctl -w net.ipv4.tcp_timestamps=0
> sudo sysctl -w net.ipv4.tcp_sack=0
> sudo sysctl -w net.ipv4.tcp_window_scaling=1
> 
> # unload unsused kernel modules
> 
> sudo rmmod snd_bcm2835 snd_soc_pcm512x_i2c snd_soc_tas5713 i2c_bcm2708
> spi_bcm2708 snd_soc_bcm2708_i2s
> sudo rmmod snd_soc_pcm512x regmap_i2c regmap_mmio snd_soc_core
> snd_pcm_dmaengine snd_compress
> 
> sleep 3
> 
> # stop services
> 
> sudo /usr/local/etc/init.d/httpd stop
> sudo kill -9 $(pidof udevd)
> sudo kill -9 $(pidof udhcpc)
> sudo kill -9 $(pidof crond)
> 
> sudo umount /dev/loop1
> sudo umount /dev/loop5
> 
> sudo killall dropbear
> sudo umount /dev/loop0
> sudo sh -c "sync; echo 3 > /proc/sys/vm/drop_caches"
> 
> # end

Hi praganj,

No flame wars here. :D Thanks for reporting your findings.

We have added the "User commands" feature on the tweaks page to give
people hooks into the booting process.

Here's is what I suggest.

Place your commands into a script, clean.sh
Comment out sleep 600, we will do that later.
chmod 755 clean.sh
Put the script into the /opt (or /home/tc) directory.
Do a backup, "sudo filetool.sh -b" or just press a "Save" button on the
web gui.
In "User command #1" add: sleep 600; /opt/clean.sh &
Hit the "Save" button.
Reboot.


For testing I suggest "sleep 60" it still gives you enough time to
adjust things.

regards
Greg


------------------------------------------------------------------------
Greg Erskine's Profile: http://forums.slimdevices.com/member.php?userid=7403
View this thread: http://forums.slimdevices.com/showthread.php?t=97803

_______________________________________________
unix mailing list
unix@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/unix

Reply via email to