Re: gettimeofday() in hping
Hi, Sorry if a little bit insist curious. what is result from: sysctl -a kern.ipc.maxsockbuf sysctl -a net.inet.tcp.recvspace sysctl -a net.inet.tcp.sendspace ?? binto Greetings, Kris Kennaway wrote: Stefan Lambrev wrote: It is the socket buffer that is filling up. Either the application is not increasing it to large enough size or the default maximum is too low (Linux may set a larger default). Try increasing kern.ipc.maxsockbuf and confirming with the source and/or ktrace that it is doing the right setsockopt() call. Increasing kern.ipc.maxsockbuf doesn't help. Actually this is the code that failed and print this error: result = sendto(sockraw, packet, packetsize, 0, (struct sockaddr*)remote, sizeof(remote)); if (result == -1 errno != EINTR !opt_rand_dest !opt_rand_source) { perror([send_ip] sendto); Those are the only references for setsockopt when ktracing: 3385 hpingCALL __sysctl(0xbfbfe870,0x6,0,0xbfbfe888,0,0) 3385 hpingRET __sysctl 0 3385 hpingCALL __sysctl(0xbfbfe870,0x6,0x28305180,0xbfbfe888,0,0) 3385 hpingRET __sysctl 0 3385 hpingCALL socket(PF_INET,SOCK_DGRAM,IPPROTO_IP) 3385 hpingRET socket 3 3385 hpingCALL setsockopt(0x3,SOL_SOCKET,SO_BROADCAST,0xbfbfe884,0x4) 3385 hpingRET setsockopt 0 3385 hpingCALL connect(0x3,0x8067da0,0x10) 3385 hpingRET connect 0 3385 hpingCALL getsockname(0x3,0xbfbfe874,0xbfbfe888) 3385 hpingRET getsockname 0 3385 hpingCALL close(0x3) 3385 hpingRET close 0 3385 hpingCALL socket(PF_INET,SOCK_RAW,IPPROTO_RAW) 3385 hpingRET socket 3 3385 hpingCALL setsockopt(0x3,SOL_SOCKET,SO_BROADCAST,0xbfbfe914,0x4) 3385 hpingRET setsockopt 0 3385 hpingCALL setsockopt(0x3,0,0x2,0xbfbfe914,0x4) 3385 hpingRET setsockopt 0 3385 hpingCALL open(0xbfbfe8a4,O_RDWR,unused0) 3385 hpingNAMI /dev/bpf0 3385 hpingRET open -1 errno 16 Device busy 3385 hpingCALL open(0xbfbfe8a4,O_RDWR,unused0) 3385 hpingNAMI /dev/bpf1 3385 hpingRET open 4 OK, try adding the setsockopt(...SO_SNDBUF...) call. Will something like this do the trick? void socket_sndbuf(int sd) { long int bufsize; bufsize = 65536; if (setsockopt(sd, SOL_SOCKET, SO_SNDBUF, (char *)bufsize, sizeof(int)) == -1) { printf([socket_sndbuf] can't set SO_SNDBUF option\n); } } I'm not a C developer so pardon me if I made something stupid :) Also how can I make bufsize = default settings*2 for example? I tried this code and here is what ktrace show now: 65372 hping3 CALL socket(PF_INET,SOCK_DGRAM,IPPROTO_IP) 65372 hping3 RET socket 3 65372 hping3 CALL setsockopt(0x3,SOL_SOCKET,SO_BROADCAST,0xbfbfe844,0x4) 65372 hping3 RET setsockopt 0 65372 hping3 CALL connect(0x3,0x8067e20,0x10) 65372 hping3 RET connect 0 65372 hping3 CALL getsockname(0x3,0xbfbfe834,0xbfbfe848) 65372 hping3 RET getsockname 0 65372 hping3 CALL close(0x3) 65372 hping3 RET close 0 65372 hping3 CALL socket(PF_INET,SOCK_RAW,IPPROTO_RAW) 65372 hping3 RET socket 3 65372 hping3 CALL setsockopt(0x3,SOL_SOCKET,SO_BROADCAST,0xbfbfe8d4,0x4) 65372 hping3 RET setsockopt 0 65372 hping3 CALL setsockopt(0x3,0,0x2,0xbfbfe8d4,0x4) 65372 hping3 RET setsockopt 0 65372 hping3 CALL setsockopt(0x3,SOL_SOCKET,SO_SNDBUF,0xbfbfe8d4,0x4) 65372 hping3 RET setsockopt 0 Kris ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED] -- Best Wishes, Stefan Lambrev ICQ# 24134177 ___ 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: gettimeofday() in hping
Greetings, Steven Hartland wrote: - Original Message - From: Ivan Voras [EMAIL PROTECTED] The other thing that bothers me is, that under freebsd is quite easy to get: [send_ip] sendto: No buffer space available It happens almost always on my laptop just few seconds after I start hping with timecounter=TSC I'm not sure, but from what I understood of Robert Watson's explanation in the big ZFS thread on -current, maybe increasing kmem_size (exactly as for ZFS...) could help you with these buffers. Is this not just running out of mbufs? netstat -m will show if it is and the fix is to just increase kern.ipc.nmbclusters. 670/1520/2190 mbufs in use (current/cache/total) 462/322/784/25600 mbuf clusters in use (current/cache/total/max) 462/306 mbuf+clusters out of packet secondary zone in use (current/cache) 0/35/35/12800 4k (page size) jumbo clusters in use (current/cache/total/max) 0/0/0/6400 9k jumbo clusters in use (current/cache/total/max) 0/0/0/3200 16k jumbo clusters in use (current/cache/total/max) 1091K/1164K/2255K bytes allocated to network (current/cache/total) 0/0/0 requests for mbufs denied (mbufs/clusters/mbuf+clusters) 0/0/0 requests for jumbo clusters denied (4k/9k/16k) 0/4/6656 sfbufs in use (current/peak/max) 0 requests for sfbufs denied 0 requests for sfbufs delayed 0 requests for I/O initiated by sendfile 0 calls to protocol drain routines kern.ipc.nmbclusters: 25600 sysctl -a kern.ipc.maxsockbuf ? if net.inet.tcp.recvspace / net.inet.tcp.sendspace greater than kern.ipc.maxsockbuf that can also make : No buffer space available I do not think I'm running out of mbufs. And increasing nmbclusters doesn't help. Here is what I have for kmem_size. How can I see how much of the kmem size is used ? vmstat -m :) vm.kmem_size_scale: 3 vm.kmem_size_max: 335544320 vm.kmem_size_min: 0 vm.kmem_size: 335544320 Something suspicious that I notice is: vmstat -m|grep devbuf devbuf 5214 42780K - 6390 16,32,64,128,256,512,1024,2048,4096 42MB memory allocated for devbuf ? Is this ok ? This is the only thing that 'eat' more then 1-2MB memory reported by vmstat -m. -- Best Wishes, Stefan Lambrev ICQ# 24134177 ___ 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]
version hwpmc kernel module pmc library not match
Hi, i run command for kernel profiling purpose: pmcstat -S instructions -O /tmp/sample.out and i get error: pmcstat: ERROR: Initialization of the pmc(3) library failed: No such file or directory I've compile my FreeBSD 6.3-PRERELEASE kernel in i386 machine : device hwpmc options HWPMC_HOOKS myquestion: - any suggestion to fix that error? - how to find what version number of the hwpmc in my machine? - does pmc have version too? Thanks Binto ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: version hwpmc kernel module pmc library not match
check with cpuid: Vendor ID: GenuineIntel; CPUID level 10 Intel-specific functions: Version 06f7: Type 0 - Original OEM Family 6 - Pentium Pro Model 15 - Extended model 0 Stepping 7 Reserved 0 Extended brand string: Intel(R) Xeon(R) CPU E5335 @ 2.00GHz CLFLUSH instruction cache line size: 8 Hyper threading siblings: 4 Check ports 'cpuid' - Vendor ID: GenuineIntel; CPUID level 10 Intel-specific functions: Version 06f6: Type 0 - Original OEM Family 6 - Pentium Pro Model 15 - Extended model 0 Stepping 6 Reserved 0 Odds are you have a post-P4 Intel processor. -Kip On Dec 17, 2007 7:47 PM, binto [EMAIL PROTECTED] wrote: Hi, i run command for kernel profiling purpose: pmcstat -S instructions -O /tmp/sample.out and i get error: pmcstat: ERROR: Initialization of the pmc(3) library failed: No such file or directory I've compile my FreeBSD 6.3-PRERELEASE kernel in i386 machine : device hwpmc options HWPMC_HOOKS myquestion: - any suggestion to fix that error? - how to find what version number of the hwpmc in my machine? - does pmc have version too? Thanks Binto ___ 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] ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Before After Under The Giant Lock
Hi, Thanks for all response, especially for Mr. Robert N M Watson I read all , and i got a lot thing from conversation about this. It's nice community, thanks once again. Regards Binto Roman Divacky wrote: On Sun, Nov 25, 2007 at 02:41:35PM -0600, Stephen Montgomery-Smith wrote: On Sun, 25 Nov 2007, Robert Watson wrote: In FreeBSD 8, I expect we'll see a continued focus on both locking granularity and improving opportunities for kernel parallelism by better distributing workloads over CPU pools. This is important because the number of cores/chip is continuing to increase dramatically, so MP performance is going to be important to keep working on. That said, the results to date have been extremely promising, and I anticipate that we will continue to find ways to better exploit multiprocessor hardware, especially in the network stack. I just want to add my 2 cents, that my recent experience with FreeBSD MP has been extremely positive. I tend to use highly CPU bound MP programs, typically lots and lots of floating point operations. It used to be that Linux beat FreeBSD hands down - now FreeBSD seems to have a slight edge! Basically my program runs about twice as fast when I run two threads as opposed to one - I cannot see doing any better than that! pure computation does not need kernel operations most of the time.. ie. multi-threading kernel wont help much ;) It has an indirect benefit by (presumably) not being in contention with the userland process, and not needing slap Giant on the whole system every few milliseconds. Doug -- This .signature sanitized for your protection ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED]
Before After Under The Giant Lock
Hi, From what I read in The Design and Implementation of the FreeBSD Operating System,said: 'However, most of the heavily used parts of the kernel have been moved out from under the giant lock, including much of the virtual memory system, the networking stack, and the filesystem.' What the different virtual memory system, the networking stack, and the filesystem. before under giant lock after moved out from under giant lock? I'm interest get deeper learn operating system, especially with FreeBSD.. Regards, Binto ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: options TI_JUMBO_HDRSPLIT and TI_PRIVATE_JUMBOS are mutually exclusive
another question. in my 'dmesg' i have NIC - em0 Intel(R) PRO/1000 Network Connection Version - 6.6.6...is it support Tigon driver that need to set ZERO_COPY_SOCKETS ? thx On Fri, Nov 02, 2007 at 09:39:19AM +0700, binto wrote: I try to compile MYKERNEL to set zero_copy tigon driver in my machine with: device ti options TI_PRIVATE_JUMBOS options TI_JUMBO_HDRSPLIT but got: #error options TI_JUMBO_HDRSPLIT and TI_PRIVATE_JUMBOS are mutually exclusive what's up? %vi +/TI_JUMBO_HDRSPLIT /usr/src/sys/conf/NOTES -- Regards, Pyun YongHyeon ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: page fault degaradation performance
Btw, what is page replacement algorithm that used by FreeBSD...sorry I'm newbie..LRU or another algorithm? Running out of memory and having to continually swap things in and out of ram degrades performance, yes. Page faults are simply how the virtual memory subsystem gets things done, like pulling things out of swap. --Doug On Nov 7, 2007 7:48 PM, binto [EMAIL PROTECTED] wrote: Btw Even page fault isn't a terrible thing, but she could make trashing condition..that can degrade CPU utilization, am i correct? On 11/6/07, binto [EMAIL PROTECTED] wrote: I just wanna know, how to reduce the number of page faults to upgrade program or OS performance? is there any parameters that i must set if i reduce the number of page fault? Don't forget that some amount of page faults are normal consequences of using a machine with virtual memory. Page faults alone are not an indicator that you're out of memory or suffering in any way, they just mean that something was requested in vm that wasn't actually in ram, and needed to be loaded. Ask 'swapinfo' or 'top' to see if you might possibly benefit from more ram by reducing paging. --Doug ___ 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]
kgdb: cannot read IdlePTD ??
# cd /usr/src/sys/i386/compile/KERNELSOME/ # kgdb kernel.debug /var/crash/vmcore.0 kgdb: cannot read IdlePTD kgdb: cannot read IdlePTD???help pls thx BWP ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: options TI_JUMBO_HDRSPLIT and TI_PRIVATE_JUMBOS are mutually exclusive
...seem like i just need for Tx side [ smtp /outgoing mail server ] by enable kern.ipc.zero_copy.send disable kern.ipc.zero_copy.receive thx binto On Fri, Nov 02, 2007 at 11:00:26AM +0700, binto wrote: another question. in my 'dmesg' i have NIC - em0 Intel(R) PRO/1000 Network Connection Version - 6.6.6...is it support Tigon driver that need to set ZERO_COPY_SOCKETS ? em(4) supports zero copy for Tx side. zero copy for receiver side requires header splitting assistance from hardware which is not available in em(4). I guess ti(4) on Tigon II would be the only driver that supports header splitting. However it seems newer Intel NICs and Sun Cassini+ seems to have header splitting feature. Jack Vogel, maintainer of em(4), may have more information for header splitting support on em(4).(CCed) thx On Fri, Nov 02, 2007 at 09:39:19AM +0700, binto wrote: I try to compile MYKERNEL to set zero_copy tigon driver in my machine with: device ti options TI_PRIVATE_JUMBOS options TI_JUMBO_HDRSPLIT but got: #error options TI_JUMBO_HDRSPLIT and TI_PRIVATE_JUMBOS are mutually exclusive what's up? %vi +/TI_JUMBO_HDRSPLIT /usr/src/sys/conf/NOTES -- Regards, Pyun YongHyeon -- Regards, Pyun YongHyeon ___ 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]
page fault degaradation performance
I just wanna know, how to reduce the number of page faults to upgrade program or OS performance? is there any parameters that i must set if i reduce the number of page fault? thx ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED]
options TI_JUMBO_HDRSPLIT and TI_PRIVATE_JUMBOS are mutually exclusive
I try to compile MYKERNEL to set zero_copy tigon driver in my machine with: device ti options TI_PRIVATE_JUMBOS options TI_JUMBO_HDRSPLIT but got: #error options TI_JUMBO_HDRSPLIT and TI_PRIVATE_JUMBOS are mutually exclusive what's up? thx ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED]