Re: "Best" BSD for Linux users?



Andrew Reilly <andrew-newspost@xxxxxxxxxxxxxxxxxxxxx> wrote:
On Tue, 20 Nov 2007 19:14:36 +0000, Cydrome Leader wrote:

Andrew Reilly <andrew-newspost@xxxxxxxxxxxxxxxxxxxxx> wrote:
On Tue, 25 Sep 2007 20:20:46 +0000, Cydrome Leader wrote:
Sure, please share the commands I can run in FreeBSD to make sure that
not more than 25% of total CPU goes to a group of processes. Example
machine can be a 4 way xeon, in addition to this group of processes
not getting more than 50% of available memory, which is say 3GB.

nice doesn't cut it these days.

What are the conditions under which you would want to make a
restriction like that? Over what sort of time frames (instruction
cycles; timer ticks; multiple whole seconds) are such measurements
meaningful?

Say I don't want stupid queries on a database hogging all CPUs on a dev
box. Same for 100% cpu perl scrips, again in a dev environment.

Why would you care? What advantage do you receive by having non-zero

I care because I loathe having to power cycle a machine because I can't
control it. This can happen to solaris, but it's much harder to pull off
in the first place.

A heavily loaded FreeBSD (my favorite BSD) can easily run away and that's
in, you can't do anything, even at the console aside from maybe hit enter
and have the terminal scroll. I don't have numbers here, but I'm pretty
comfortable saying BSD stuff seems more responsive and recoverable than a
runaway linux box, but still lacking by today's standards.

idle fraction (given that switching tasks is instantaneous, at the human-
perceptual time frame)? On FreeBSD I've always found that the
traditional BSD interactive-vs-background scheduling rule kept my
development sessions lively, even when "heavy" stuff was happening in the
background.

even a vi session will crawl to a halt when your're swapped out, and have
a bunch of blocks, and something gobbling up all the remaining CPU.


The only time that I can think of where you would want the sort of
limitation that you're asking for is when a given box has to serve two or
more different sorts of "heavy background" processing, and for some
reason you *don't* want them all to get an equal share of the machine.

unix is inherently multi-user and multiprocess, so there is a good chance
I may have more than two things happening at once.

As I said, I've never encountered a situation like that myself.

My use patterns are obviously too simple: in over 20 years of using
various BSDs, I can't say that I've ever felt the need.

That's what I though, until I saw systems that can recover from a
situation where everybody throws their hands up and announces it's time to
reboot a system.

You've never had a process hit 100% CPU, or worse several processes eat
up all idle time?

Sure: processes use 100% CPU all the time, but the point is that whenever
my editor needs its 1% to reflect my keystrokes or mouse movements, the
busy task only gets 99% for that 100th of a second, and everyone is happy.

(In the specific example that you asked about, would restricting those
processes to use one of the four CPUs be a sufficient answer? I don't
know whether that's possible in FreeBSD either; I suspect not. What if

It's not. the FreeBSD people are too busy working on stupid stuff like
changing logos, not features.

I think that you'll find that there are separate groups of people dealing
with those issues. The people working on the system have been quite busy
lately, dealing with multi-processor scheduling and threading issues, as

Worrying about fine tuning SMP that already works pretty good for the most
part should maybe happen after adding features like modern process
controls or even a journalized fileystem. Windows had has NTFS for about
15 years now, AIX forever, and even failures like SGI had one. They're
actually pretty handy to have, yet the BSD folks are too busy with trivial
stuff instead of focusing on things that might bring BSD out of the 80s.

it turns out (besides other things). If you're interested, there is a
quarterly bulletin that gets posted to somewhere on the web (as well as
the mailing lists, where I read it) that reports on all of the
development that is going on. It's not a short list.

that one processor still saturated the single memory bus, and the other
three were unable to make as much progress as you might hope?)

I haven't been able to do that, although 100% resource usage of 1
processor vs. all of them is something I'd prefer.

Thats easy to achieve by just running a single-threaded application. If
your application is naturally multi-threaded, then linking it against one
of the pre-SMP thread libraries (like GNU pth, or libc_r from the -4
branch) would probably achieve the same thing. I doubt that you'll find
much documentation on doing that though: mostly people are *happy* when
their multi-threaded workload manages to use all of the processors. Idle
processors are wasted resources.

Well, at this point none of the free BDS have the ability to guarantee
resources for important processes (getty for example) or to gaurantee that
there will always be ample free resources to make sure that my console
stays responsive enough for me to kill rogue processes off, or that I will
be able to login when things get weird. One obnoxious incident involved a
machine that was unresponsive except for fingerd and bind. Everything else
was hosed, but these two things ran like tops with no delays at all. For
whatever reason, they ended up with top priority and everything else was
useless.

I'd be happy either of those, but apparently a contest to rebrand how the
daemon looks was more important and got priority.

Yes, you can crash a solaris box, or end up with tens of thousands of
zombies and the run out of resources to fork a command like "init 1", but
it's way harder to do in the first place.
.



Relevant Pages

  • processes tied to one CPU
    ... I have a multiprocessor machine running Solaris 8 with one very busy ... How can I tell which process is using all my resources? ... CPU minf mjf xcal intr ithr csw icsw migr smtx srw syscl usr sys wt idl ...
    (SunManagers)
  • Re: Flood and Bandwith Protection
    ... it consume too much CPU on the router unfortunately .. ... Sounds like you want to limit outside attacks against your customers. ... you'll want to block the source (attacker), not the destination, ... as is my BSD box ... ...
    (comp.security.misc)
  • 1.25GHz 20 flat screen imac HD Upgrade
    ... I've had my 1.25GHz 20' flat screen imac for a couple of years now and ... CPU Speed: 1.25 GHz ... Capacity: 74.53 GB ... BSD Name: disk0s3 ...
    (comp.sys.mac.system)
  • Re: HTT on single CPU?
    ... > Brooks Davis wrote: ... > I know, that BSD didn't found 2 logical CPU's as John remarked, ... The bit just means that you can ask the CPU how many cores it ...
    (freebsd-current)
  • Re: Top and 4 CPUs
    ... like it does on linux or *bsd that can be ... >> show the load on each CPU? ...
    (comp.sys.sun.admin)