Re: Benchmark: NetBSD 2.0 beats FreeBSD 5.3

2005-01-08 Thread Ceri Davies
On Fri, Jan 07, 2005 at 06:10:06PM +0800, Xin LI wrote:
> On Fri, Jan 07, 2005 at 09:21:10AM +, Ceri Davies wrote:
> > I don't really think that this benchmark is bad news for either OS.  My
> > only real concern are the process creation/termination results on FreeBSD.
> 
> I guess that this might worth investigating:
> 
>   http://people.freebsd.org/~das/pbench/pbench.html
> 
> (Unfortuantelly, neither tjr@ nor I have touched our patchsets recently.
> A most recent snapshot of the two patchsets are here:
> 
>   http://research.delphij.net/freebsd/pid.diff
>   http://research.delphij.net/freebsd/pid-tjr.diff)
> 
> Most of the work was to catch up with Aug 2004's -CURRENT, but it might
> be easier to bring them up-to-date instead of working from the very original
> patches =-)

Looks great.  Any reason why neither has been committed?

Ceri
-- 
Only two things are infinite, the universe and human stupidity, and I'm
not sure about the former.-- Einstein (attrib.)


pgp19cu4wd0Hs.pgp
Description: PGP signature


Raw sockets problem?

2005-01-08 Thread Ivan Voras
I've just noticed I can't create a raw socket on 5.3-RELEASE, while the 
same code works on 5.2. I get 'Protocol not supported' error on code 
like this:

#include 
#include 
#include 
#include 
#include 
void main() {
int sock = socket(AF_LINK, SOCK_RAW, 0);
if (sock < 0)
printf(strerror(errno));
}
Code like this *seems* ok (and I'm sure it worked on 5.2)... why does it 
fail now?
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Raw sockets problem?

2005-01-08 Thread Robert Watson

On Sat, 8 Jan 2005, Ivan Voras wrote:

> I've just noticed I can't create a raw socket on 5.3-RELEASE, while the
> same code works on 5.2. I get 'Protocol not supported' error on code
> like this: 

I've not got a 5.2 box on hand, but this appears not to work on 4.x. 
There isn't a domain handler for AF_LINK, so you shouldn't be able to
create a socket of that type, so if it was possible in 5.2, it was likely
a bug.

Robert N M Watson


> 
> #include 
> #include 
> #include 
> #include 
> #include 
> 
> void main() {
>  int sock = socket(AF_LINK, SOCK_RAW, 0);
>  if (sock < 0)
>  printf(strerror(errno));
> }
> 
> Code like this *seems* ok (and I'm sure it worked on 5.2)... why does it 
> fail now?
> ___
> freebsd-hackers@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
> To unsubscribe, send any mail to "[EMAIL PROTECTED]"
> 

___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Benchmark: NetBSD 2.0 beats FreeBSD 5.3

2005-01-08 Thread Charles Sprickman
On Sat, 8 Jan 2005, Ceri Davies wrote:
On Fri, Jan 07, 2005 at 06:10:06PM +0800, Xin LI wrote:
On Fri, Jan 07, 2005 at 09:21:10AM +, Ceri Davies wrote:
I don't really think that this benchmark is bad news for either OS.  My
only real concern are the process creation/termination results on FreeBSD.
I guess that this might worth investigating:
http://people.freebsd.org/~das/pbench/pbench.html
(Unfortuantelly, neither tjr@ nor I have touched our patchsets recently.
A most recent snapshot of the two patchsets are here:
http://research.delphij.net/freebsd/pid.diff
http://research.delphij.net/freebsd/pid-tjr.diff)
Most of the work was to catch up with Aug 2004's -CURRENT, but it might
be easier to bring them up-to-date instead of working from the very original
patches =-)
Looks great.  Any reason why neither has been committed?
Any idea what type of impact this patch would have on say, a large qmail 
server that's drowning in context-switches?

Charles
Ceri
--
Only two things are infinite, the universe and human stupidity, and I'm
not sure about the former.-- Einstein (attrib.)
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Benchmark: NetBSD 2.0 beats FreeBSD 5.3

2005-01-08 Thread Xin LI
On Sat, Jan 08, 2005 at 01:55:27PM +, Ceri Davies wrote:
> On Fri, Jan 07, 2005 at 06:10:06PM +0800, Xin LI wrote:
> > On Fri, Jan 07, 2005 at 09:21:10AM +, Ceri Davies wrote:
> > > I don't really think that this benchmark is bad news for either OS.  My
> > > only real concern are the process creation/termination results on FreeBSD.
> > 
> > I guess that this might worth investigating:
> > 
> > http://people.freebsd.org/~das/pbench/pbench.html
> > 
> > (Unfortuantelly, neither tjr@ nor I have touched our patchsets recently.
> > A most recent snapshot of the two patchsets are here:
> > 
> > http://research.delphij.net/freebsd/pid.diff
> > http://research.delphij.net/freebsd/pid-tjr.diff)
> > 
> > Most of the work was to catch up with Aug 2004's -CURRENT, but it might
> > be easier to bring them up-to-date instead of working from the very original
> > patches =-)
> 
> Looks great.  Any reason why neither has been committed?

I have already updated Tim's patch to match latest -CURRENT:
http://people.freebsd.org/~delphij/patch-hashpid

I haven't actually checked the patch at this time, though.  But even
if there is something strange happend it should not be so hard to check
the recent commit logs to respective files.

I plan to update the NetBSD allocator as soon as I have an entire chunk
of time, even if it was not chosen as the final version of our PID allocator,
as previously inclined in the discussion, I'd like to keep it as a part of
my private collection ;-)

What we should pay extra attention is that while both patch could lead
to a performance gain in microbenchmarks, there is also chance that they
slow down something else.  Carefully investigate of these issues are
required before we actually commit one of the two.

I don't have much time to deal with this topic in the near future.  So
it's up to Tim or other fellow committers' decision whether to commit one of
the two, with or without change, but it's important that we have done
some actual test before doing that =-)

Cheers,
-- 
Xin LI   http://www.delphij.net/
See complete headers for GPG key and other information.



pgpeBe3k8Mc0S.pgp
Description: PGP signature


Re: Benchmark: NetBSD 2.0 beats FreeBSD 5.3

2005-01-08 Thread David Malone
On Sat, Jan 08, 2005 at 01:21:14PM -0500, Charles Sprickman wrote:
> Any idea what type of impact this patch would have on say, a large qmail 
> server that's drowning in context-switches?

It will depend on how many processes you have running at any one
moment and how often processes are created/destroyed. From the look
of the graphs, you won't really be able to tell unless there are
significantly more than 1000 processes running at any moment.

David.
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Benchmark: NetBSD 2.0 beats FreeBSD 5.3

2005-01-08 Thread Robert Watson

On Sat, 8 Jan 2005, Charles Sprickman wrote:

> Any idea what type of impact this patch would have on say, a large qmail
> server that's drowning in context-switches? 

Probably not, but if you have a tolerance for doing profiling, loading
debugging code, etc, there may be other things we can do that will help.
Are you interested in spending a bit of time profiling the system to see
what's going on?  In particular, is the system actually live locking, or
just getting very bogged down and as a result performing badly?

A few things that would be quite interesting to see up front:

- dmesg
- A couple of screens of output of "systat -vmstat 1", perhaps over the
  course of 5 minutes.
- A couple of screens of output of "top -S", also over the course of 5
  minutes.

Of particular interest would be how much time is being spent in system vs
user or idle cpu, and whether this is an SMP box or not.  Is the box
running with the MPSAFE network stack?

Robert N M Watson

___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Raw sockets problem?

2005-01-08 Thread Ivan Voras
Robert Watson wrote:
> On Sat, 8 Jan 2005, Ivan Voras wrote:
>
>
>> I've just noticed I can't create a raw socket on 5.3-RELEASE, while the
>> same code works on 5.2. I get 'Protocol not supported' error on code
>> like this:
>
>
>
> I've not got a 5.2 box on hand, but this appears not to work on 4.x. 
There isn't a domain handler for AF_LINK, so you shouldn't be able to
> create a socket of that type, so if it was possible in 5.2, it was likely
> a bug.

I use it in this code:
/* get interface name by index */
int cardif_get_int(int index, char *retInterface)
{
struct ifreq ifr;
struct ifaddrs *ifa_master, *ifa;
int sock, retval;
char msg[100];
sock = socket(AF_LINK, SOCK_RAW, 0);
if (sock < 0) {
sprintf(msg, "cardif_get_int: cannot create raw socket: %s\n", 
strerror(errno));
debug_printf(DEBUG_NORMAL, msg);
return XESOCKOP;
}

getifaddrs(&ifa_master);
for (ifa = ifa_master; ifa != NULL; ifa = ifa->ifa_next) {
strncpy(ifr.ifr_name, ifa->ifa_name, IFNAMSIZ);
retval = ioctl(sock, SIOCGIFINDEX, &ifr);
if (retval < 0) {
debug_printf(DEBUG_NORMAL, "Error getting interface index 
value for interface %s\n", ifa->ifa_name);
freeifaddrs(ifa_master);
close(sock);
return XESOCKOP;
}

if (ifr.ifr_index == index)
break;
}
if (ifa == NULL) {
debug_printf(DEBUG_NORMAL, "Cannot find interface name by its 
index: %d\n", index);
freeifaddrs(ifa_master);
close(sock);
return XENOTINT;
}

strncpy(retInterface, ifa->ifa_name, IFNAMSIZ);
freeifaddrs(ifa_master);
close(sock);
return XENONE;
}
---
i.e. I need it for the ioctl() call. Is there another way?
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Benchmark: NetBSD 2.0 beats FreeBSD 5.3

2005-01-08 Thread Ryan Sommers
David Malone wrote:
On Sat, Jan 08, 2005 at 01:21:14PM -0500, Charles Sprickman wrote:
 

Any idea what type of impact this patch would have on say, a large qmail 
server that's drowning in context-switches?
   

It will depend on how many processes you have running at any one
moment and how often processes are created/destroyed. From the look
of the graphs, you won't really be able to tell unless there are
significantly more than 1000 processes running at any moment.
	David.
 

This could be the case.
It's my understanding that Qmail spawns a new qmail-local process 
(specifically qmail-lspawn exec's it) for each locally delivered 
message. For any remote message qmail-rspawn forks a qmail-remote 
process. I don't believe these processes live longer than a single 
instance. Depending on how his mailboxes are setup this can even result 
in new processes being spawned. If you're running vpopmail qmail-local 
will pipe the message to vdelivermail. And if you're running anything 
like spamassassin from vpopmail (as opposed to from qmail via the 
QMAIL_QUEUE patch, although that will spawn a spamc of it's own) this 
could result in another executed process (spamc is spamd's light-weight 
front-end).

Depending on how large and busy this qmail server is, there could 
definately be a large amount of time spent in process creation and teardown.

I'm not sure how much Charles is familiar with the 
Qmail+vpopmail+spamassassin, if he is using spamassassin. But, one of 
the "hidden" features of using SpamAssassin and Vpopmail as installed 
from ports is that spamassassin is called from vpopmail. There is no 
run-time option (only compile time that is defaulted to on) to disable 
this. A lot of users don't realize this and will use the QMAIL_QUEUE 
patch and run spamassassin from it. This can result in scanning every 
email twice, which can be a costly oversight.

--
Ryan Sommers
[EMAIL PROTECTED]
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Benchmark: NetBSD 2.0 beats FreeBSD 5.3

2005-01-08 Thread Dmitry Morozovsky
On Sat, 8 Jan 2005, David Malone wrote:

DM> On Sat, Jan 08, 2005 at 01:21:14PM -0500, Charles Sprickman wrote:
DM> > Any idea what type of impact this patch would have on say, a large qmail 
DM> > server that's drowning in context-switches?
DM> 
DM> It will depend on how many processes you have running at any one
DM> moment and how often processes are created/destroyed. From the look
DM> of the graphs, you won't really be able to tell unless there are
DM> significantly more than 1000 processes running at any moment.

Then perhaps someone like scrappy@ should test it on one of his hosting planets 
;-)

Sincerely,
D.Marck [DM5020, MCK-RIPE, DM3-RIPN]

*** Dmitry Morozovsky --- D.Marck --- Wild Woozle --- [EMAIL PROTECTED] ***

___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"