Throttle Shared Users With OS X — Is It Possible?
whisper_jeff writes "I work in a design studio where the production director is also the owner's son (translation = he can do no wrong). He is fond of accessing a designer's computer via filesharing and working directly on files off of the designer's computers rather than transferring the files to his computer to work on them there. In so doing, he causes the designer's computer to grind to a near-halt as the harddrive is now tasked with his open/save requests along with whatever the designer is doing. Given that there is no way he's going to change his ways (since he doesn't see anything wrong with it...), I was wondering if there was a way to throttle a user's shared access to a computer (Mac OSX 10.5.8) so that his remote working would have minimal impact on our work. Google searches have revealed nothing helpful (maybe I should Bing it... :) so I was hoping someone with more technical expertise on Slashdot could offer a suggestion."
It's really easy, I swear:
Write a script that will hammer the everlasting fuck out of his shared drive when he's trying to do something. As (I assume) the IT department, he will complain to you. When he does, politely say, "Yeah, I think that can happen when users constantly access files on a remote shared drive. Someone must be doing that to your box. It really sucks, huh?"
When someone acts like a child, you must treat them like a child. Some people just have to find out what "Think about how that would make you feel" really means the hard way.
Support the EFF and Creative Commons. The war is coming, and they're supporting you...
His mac grinds to a halt due to samba? Lower the process priority of samba on the mac serving the files.
But the better question is, if these are shared files that he's working on, why aren't they on a central server thats made to serve files. Why are they on individual machines anyway? If your network is fast enough that it can make the server mac get loaded down with disk IO than its certainly fast enough to serve the files from a central share for both users anyway.
The solution is to throttle the 'workstations' file server by turning it off and moving the files to a proper server.
The hack'd solution is to realize that you're talking about a mac serving files ... which means samba ... which has all the power you need to limit the user in question to a sane rate.
man smb.conf and be prepared for lots of reading.
Persistent Volume manager for Kubernetes - https://github.com/dwimsey/openshift-pvmanager
This definitely would be a good solution.
But I like the 'Windows' method of solving the problem: reboot. When the co-worker has this sudden slow down on his system, reboot to clear up the 'resource problem'. Certainly a more vindictive way to solve the issue, but effective.
I will shred my adversaries. Pull their eyes out just enough to turn them towards their mewing, mutilated faces. Illyria
You missed the part where he said "design studio" and "OS X."
Which raises the question: why don't they have a $1000 Mac Mini Server already?
I actually did a variation on this years ago (1988 or so) in a company running Novell. One of the servers was also acting as a router (it had two network cards and connected two 10base-2 segments). Every time someone did a database update, I got kicked off the network for an hour.
No one listened to me that this was a problem, so I just brought a book to the office, and when this happened, put my feet up on the desk and read.
It was only a few days of this before the owner of the company 'caught' me and goes nuts. I explained calmly the situation, that I couldn't work when an update was going on, and had been told there was no money to upgrade the server.
A new server was ordered that afternoon.
I had a similar problem a long time ago. One of the 3 partners running the joint was always poking around with file sharing, slowing the single expensive desktop publishing workstation down to a crawl. The perpetrator was the company's Fragile Genius and the other partners told us tough, there was no way they would ask him to modify his behavior.
Eventually, the Fragile Genius began locking himself in his office. There was one window that looked out into a common area, and he spray-painted it black. We believe it was about at this time he started smoking crack in his office.
He also had a kitten, which he rescued from the streets and then began to poison by feeding it nothing but raw hot dogs.
You think it's hard to stop the owner's son from doing anything wrong? Be glad it isn't the owner himself.
But honestly it was not the crack smoking that got the other partners to straighten this guy out. It was his cat peeing on their chairs.
Therefore, my advice is to give the boss's son a kitten and a pack of hot dogs, and maybe some black spray paint. If you know a crack dealer, an introduction may be fruitful.
The FreeBSD solution to this would be to use Netgraph to set his jitter to 0-5 seconds, so any file operation involving seeking became painfully slow, but copying was still fast. Netgraph, however, is not part of the XNU kernel. so this is not an option.
I am TheRaven on Soylent News
Wait till the machine is slow..call the boss over and give him a demonstration of something that you have been working on that will get him excited. Have him wait around while the pizza wheel turns... apologise profusely, use task manager or look for active connections to track down the problem voila new computer or action
Brisbane Aikido Republic
If you have root access and the kid does not then there are some kludges you can do. For example, write a launchdaemon that runs
renice -n 20 -u kidsudername
every 5 minutes.
that will squish the CPU activity more than the Disk activity, but it should improve things a lot.
if you want to be a little passive aggressive you could move the login port to another port then put another process on that port that pipes to the real one but with a small delay. It will make the whole connection mysteriously intolerable. Again it's the launch agents that do this port mapping. so you move ssh from port 22 to port 5022. then have a job running that runs on port 22 and sends it to port 5022. if you don't want bother writing that socket process then you can fake it with
nice -20 ssh -C -L 5022:localhost:22 localhost
to connect the two ports on the local host. toss in some compression on the SSH connection to slow it down a little. and renice this ssh tunnel to 20 so it bogs if you are busy.
Some drink at the fountain of knowledge. Others just gargle.
Those OSX users sure are a sensitive bunch.
Most of the OSX users on slashdot probably use 2+ operating systems.
Someone has already written an app to do all of this Throttled
About
throttled is a bandwidth shaping application for Mac OS X and FreeBSD which allows you to cap your upstream bandwidth, prioritize ACK packets, and keep your download speeds high even when your server is sending out at full speed.
Features
* Allows you to set a global bandwidth cap for all your applications, or multiple caps with different speeds to guarantee all your servers a certain amount of bandwidth.
* Allows you to setup wighted queues for your network data to guarantee low-latency ssh, telnet, etc connections on your server.
* Includes optimizations for many online games including Unreal Tournament 2004, World of Warcraft, Call of Duty, Ghost Recon, Starcraft, Warcraft II, Warcraft III, and Diablo II.
* Prioritizes TCP ACK packets to allow consistent bandwidth in both directions even under heavy server load.
* It uses almost no resources. CPU usage is around 0 - 3% and it uses less than 500k of RAM.
* Source code is freely available, and released under the GPL. Please read the COPYING file in the distribution.
[Disclaimer: I'm a friend of the guy who wrote it and did early early beta testing.]