Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'An AppleScript that may give OS X a speed boost' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
An AppleScript that may give OS X a speed boost
Authored by: schnarr on Apr 01, '03 12:16:12PM

I have something similar running in a startup shell script... No user renices, tho, just some renicing of PIDs.

Personally, I'd never renice root to be _SLOWER_ like this does, but then again TCP/UDP speed is much more important to me than fancy GUIs because my mac is primarily a network server. Since nearly all the networking commands I use are running as root, this would affect me a lot (inetd, ssh, VNC primarily, as well as ipfw). Since I'm not running a web server, www doesn't exist (running a web server is pointless, because port 80 is blocked by my ISP... ok, could run it on, say, port 8000, but nobody will find it there).

A nice (but non-'nice') way of boosting tcp network performance can be added into this script, if you wanted to: Apple uses very conservative default values for several kernel parameters, which can be upped using the following commands as root:
sysctl -w kern.ipc.maxsockbuf=2097152
sysctl -w net.inet.tcp.sendspace=262144
sysctl -w net.inet.tcp.recvspace=262144

You could add this to your script underneath the third do (under tell application "Terminal") add in
do shell script "sudo sysctl -w kern.ipc.maxsockbuf=2097152"
do shell script "sudo sysctl -w net.inet.tcp.sendspace=262144"
do shell script "sudo sysctl -w net.inet.tcp.recvspace=262144"

I'm not sure if that offsets any losses from renicing root, though...



[ Reply to This | # ]
An AppleScript that may give OS X a speed boost
Authored by: hagbard on Apr 05, '03 07:35:09AM

does anyone know where those many settings would be discussed/documented ?
I've tried tweaking them myself before, using their respective names to guess what that would do, but I'd love to have some definite documentation on them...

thanks



[ Reply to This | # ]