Installation and the 1024 cylinder boot problem
Recently I had to install 5.1-RELEASE at 60GB, and had a lot of troubles to start booting correctly. I hope that /stand/sysinstall have to handle >1024 cylinder booting. Otherwise I have to run 'boot0cfg' manually to fix this issue. MuTk0 ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: bzero() in mfs_doio()
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Upps, sorry, too much wine during the holidays. I've not read the code correctly ;-( On Friday 03 January 2003 15:19, Dimitar Peikov wrote: > Hi, > > I've read some part of the UFS/MFS code and saw the bzero() in code, but > according the madvice() manual page for MADV_FREE, this step is not needed. > Also frequent calls to mfs_doio() causes serious performance penalty, am I > right? > > > > MADV_FREEGives the VM system the freedom to free pages, and > tells the system that information in the specified page range is no longer > important. This is an efficient way of allowing malloc(3) to free pages > anywhere in the address space, while keeping the address space valid. The > next time that the page is referenced, the page might be demand zeroed, or > might contain the data that was there before the MADV_FREE call. > References made to that address space range will not make the VM system > page the information back in from backing store until the page is modified > again. > > > > /sys/ufs/mfs/mfs_vnops.c:259 > > bytes &= ~PAGE_MASK; > if (bytes != 0) { > bzero(&uap, sizeof(uap)); > uap.addr = base; > uap.len = bytes; > uap.behav = MADV_FREE; > madvise(curproc, &uap); > } - -- Dimitar Peikov Programmer Analyst Globalization Group "We Build e-Business" RILA Solutions 27 Building, Acad.G.Bonchev Str. 1113 Sofia, Bulgaria phone: (+359 2) 9797320 phone: (+359 2) 9797300 fax: (+359 2) 9733355 http://www.rila.com GnuPG key http://earth.rila.bg/~mitko/mitko.key.asc GnuPG key http://www.bgzone.com/~mitko/mitko.key.asc Key fingerprint 97AF 6192 78E2 AC68 FD56 CCB0 68B9 DF7D B3C1 9ED7 -BEGIN PGP SIGNATURE- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE+FY6zaLnffbPBntcRAgnFAJsEgNVGTOJkd5GdpH8RTjyMZDc0BQCdGqit E28a9Aw/lL+1VfbGT620ELc= =Rqbi -END PGP SIGNATURE- To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
bzero() in mfs_doio()
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, I've read some part of the UFS/MFS code and saw the bzero() in code, but according the madvice() manual page for MADV_FREE, this step is not needed. Also frequent calls to mfs_doio() causes serious performance penalty, am I right? >>>>>> MADV_FREEGives the VM system the freedom to free pages, and tells the system that information in the specified page range is no longer important. This is an efficient way of allowing malloc(3) to free pages anywhere in the address space, while keeping the address space valid. The next time that the page is referenced, the page might be demand zeroed, or might contain the data that was there before the MADV_FREE call. References made to that address space range will not make the VM system page the information back in from backing store until the page is modified again. >>>>>> /sys/ufs/mfs/mfs_vnops.c:259 >>>>>> bytes &= ~PAGE_MASK; if (bytes != 0) { bzero(&uap, sizeof(uap)); uap.addr = base; uap.len = bytes; uap.behav = MADV_FREE; madvise(curproc, &uap); } >>>>>> - -- Dimitar Peikov Programmer Analyst Globalization Group "We Build e-Business" RILA Solutions 27 Building, Acad.G.Bonchev Str. 1113 Sofia, Bulgaria phone: (+359 2) 9797320 phone: (+359 2) 9797300 fax: (+359 2) 9733355 http://www.rila.com GnuPG key http://earth.rila.bg/~mitko/mitko.key.asc GnuPG key http://www.bgzone.com/~mitko/mitko.key.asc Key fingerprint 97AF 6192 78E2 AC68 FD56 CCB0 68B9 DF7D B3C1 9ED7 -BEGIN PGP SIGNATURE- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE+FY3aaLnffbPBntcRAjdmAJ9TJRugyEn243W2nfX1QKNdY1yc5QCdGwqs 1TGC/1b9xgJuofP6js/u7p0= =6zCO -END PGP SIGNATURE- To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
Threading debugging
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, I'm traying to debug a fork()-ing process, and according the GDB manual pages setting the 'follow-fork-mode' to 'child' will cause to switch to children. So this could be the case if I'm attached to some process in GDB but in case that I'm debugging the master application I'm always staying in parent process. Here are the details : bash-2.04$ uname -a FreeBSD yo.rila.bg 4.6-STABLE FreeBSD 4.6-STABLE #1: Thu Oct 10 15:39:15 EEST 2002 [EMAIL PROTECTED]:/usr/obj/usr/src/sys/YO i386 $ gdb blah (gdb) set follow-fork-mode child Debugger response to a program call of fork or vfork is "child". (gdb) n / several times to reach the fork() call / 428 pid = fork(); (gdb) 429 if (pid != 0) { (gdb) p pid $2 = 12886 (gdb) Any comments would be greatfuly appreciated. - -- Dimitar Peikov Programmer Analyst Globalization Group "We Build e-Business" RILA Solutions 27 Building, Acad.G.Bonchev Str. 1113 Sofia, Bulgaria phone: (+359 2) 9797320 phone: (+359 2) 9797300 fax: (+359 2) 9733355 http://www.rila.com GnuPG key http://earth.rila.bg/~mitko/mitko.key.asc GnuPG key http://www.bgzone.com/~mitko/mitko.key.asc Key fingerprint 97AF 6192 78E2 AC68 FD56 CCB0 68B9 DF7D B3C1 9ED7 -BEGIN PGP SIGNATURE- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE9yrQoaLnffbPBntcRAj5ZAKC9kTl7OlTnOZlluZtSxUJPIdRTBgCgpymJ aq+isKvIF3GnGL9W/GikOwM= =ojrs -END PGP SIGNATURE- To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
Solaris x86 partitions
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Did someone is trying to mount Solaris x86 slice on FreeBSD. - -- Dimitar Peikov Programmer Analyst Globalization Group "We Build e-Business" RILA Solutions 27 Building, Acad.G.Bonchev Str. 1113 Sofia, Bulgaria phone: (+359 2) 9797320 phone: (+359 2) 9797300 fax: (+359 2) 9733355 http://www.rila.com GnuPG key http://earth.rila.bg/~mitko/mitko.key.asc GnuPG key http://www.bgzone.com/~mitko/mitko.key.asc Key fingerprint 97AF 6192 78E2 AC68 FD56 CCB0 68B9 DF7D B3C1 9ED7 -BEGIN PGP SIGNATURE- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE9hxCGaLnffbPBntcRAmTwAJ96s1tJJsPx09M5rFGEpT0DLiZitgCglsrI b6SyTTy9Z44piUQZ9M+4prQ= =LAwj -END PGP SIGNATURE- To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
4.6.1-rc2 booting
Hi, I donwloaded 4.6.1-rc2.ISO and tried to install it on machine with Solaris 8. Instalation went perfect, except that after booting FreeBSD boot-manager allows only to boot from Solaris x86 partition (1st partition). I can start FreeBSD from /dev/ad0s3a when boot from installation CDROM, but not from hard disk. Even on hand I've started boot0cfg -B -m 0xf -s 3 ad0 and disklabel -w -B /dev/ad0s3 but the effect were the same. Only the default slice moved from 1 to 3 (prompt: Default: F3). Did someone achieve similar problem and had it find some workaround. Here is the output of fdisk on this 10G hard disk. bsd# fdisk /dev/ad0 *** Working on device /dev/ad0 *** parameters extracted from in-core disklabel are: cylinders=1247 heads=255 sectors/track=63 (16065 blks/cyl) Figures below won't work with BIOS for partitions not in cyl 1 parameters to be used for BIOS calculations are: cylinders=1247 heads=255 sectors/track=63 (16065 blks/cyl) Media sector size is 512 Warning: BIOS sector numbering starts with sector 1 Information from DOS bootblock is: The data for partition 1 is: sysid 190,(unknown) start 1008, size 21168 (10 Meg), flag 0 beg: cyl 0/ head 16/ sector 1; end: cyl 1/ head 96/ sector 63 The data for partition 2 is: sysid 130,(Linux swap or Solaris x86) start 22496, size 1048 (4882 Meg), flag 0 beg: cyl 1/ head 102/ sector 6; end: cyl 623/ head 222/ sector 63 The data for partition 3 is: sysid 165,(FreeBSD/NetBSD/386BSD) start 10022544, size 10010511 (4887 Meg), flag 80 (active) beg: cyl 623/ head 223/ sector 1; end: cyl 1023/ head 254/ sector 63 The data for partition 4 is: To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
Re: Swapping performance
On Thu, 7 Mar 2002 11:12:03 -0800 (PST) Matthew Dillon <[EMAIL PROTECTED]> wrote: > Hmm. well, I don't think this test is very meaningful. If the > machines have 256M of ram and the test is doing a two-swipe access of > 256M of VM. This doesn't represent any real test and I would not be > surprised by the difference in timing. > > It all comes down to how much real memory Linux and FreeBSD give to > the process and there is no right answer to the question because it's > a tradeoff. An OS does not magically know that only one process will > ever need all of the machine's resources, for example, so different > operating systems are going to have very different characteristics > under these sorts of conditions. One might give over more memory, > another might want to avoid completely blowing away its other caches. > One might work well for linux in a one-process memory test could fail > miserably in a multi-process memory test, for example, or with a > different pattern of memory accesses, or a different load split > between cpu, memory, and disk I/O. > > You (Dimitar and others) also need to be careful about making broad > generalizations. Testing pure swapping performance with the below > program implies that you intend to run applications that will need to > swap heavily (for example, big mathmatical applications). If you > don't intend to run applications that will need to swap heavily then > this test is fairly meaningless as a measure of performance. > I don't make any generalizations if I can't prove that for myself. If I increase the amount of MALLOC_SIZE in this test, the results goes much more worse. Even in case that I have 25 processes running concurently with this task (there is no X, almost empty system), the program runs but ... > Another point that I should bring up in regards to swap performance: > systems that require good swap performance will almost always have > more then one physical disk to swap to. FreeBSD is very good at > paging to swap with a single disk, but it kicks ass paging to swap > with multiple disks because it implements a very good interleaving > algorithm. > > -Matt > Matthew Dillon > <[EMAIL PROTECTED]> > > :Am I the only one who saw that he attached it to his 1st mail? > : > :Here you go: > : > :#include > :#include > :#include > : > :#define MALLOC_SIZE 1024*1024*256 > : > :int main(int argc, char **argv) { > : char *ptr; > : int i, i_count; > : int j; > : > : ptr = (char *) malloc(MALLOC_SIZE); > : bzero(ptr, MALLOC_SIZE); > : > : i_count = MALLOC_SIZE / 16; > : fprintf(stderr, "*"); > : for (i = 0; i < i_count; i ++) { > : ptr[i >> 4] = ptr[(i >> 3) + 1]++; > : } > : fprintf(stderr, "#"); > : for (j = 0; j < i_count; j ++) { > : ptr[j << 4] = ptr[(j >> 3) + 1]++; > : } > : > : free(ptr); > : return 0; > :} -- Dimitar Peikov Programmer Analyst Globalization Group "We Build e-Business" RILA Solutions 27 Building, Acad.G.Bonchev Str. 1113 Sofia, Bulgaria phone: (+359 2) 9797320 phone: (+359 2) 9797300 fax: (+359 2) 9733355 http://www.rila.com To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
Re: Swapping performance
On Thu, 07 Mar 2002 11:19:25 -0800 Terry Lambert <[EMAIL PROTECTED]> wrote: > > #include > > #include > > #include > > > > #define MALLOC_SIZE 1024*1024*256 > > > > int main(int argc, char **argv) { > >char *ptr; > >int i, i_count; > >int j; > > > >ptr = (char *) malloc(MALLOC_SIZE); > >bzero(ptr, MALLOC_SIZE); > > The bzero is unnecessary on FreeBSD. Allocated pages start out > zero'ed. Part of the performance issue might be that FreeBSD is > being asked to zero the pages twice, instead of once. > > >i_count = MALLOC_SIZE / 16; > >fprintf(stderr, "*"); > >for (i = 0; i < i_count; i ++) { > >ptr[i >> 4] = ptr[(i >> 3) + 1]++; >** > Is this what was intended? This will keep the lvalue in the > first 256th of memory, and the rvalue in the first half. > > >} > >fprintf(stderr, "#"); > >for (j = 0; j < i_count; j ++) { > >ptr[j << 4] = ptr[(j >> 3) + 1]++; > >} > > This looks more right... the lvalue hits every page, and the > rvalue is (still) limited to the first half of memory. > > > > >free(ptr); > > Try just exiting; free() might be trying to be too clever > on FreeBSD. Doing the same on both platforms should not > invalidate the test. > > >return 0; > > } > > It might be more interesting to mmap() anonymous memory > (e.g. out of /dev/zero), rather than using malloc, and > then use that memory the same way, instead (it's swap > backed, as well). Giving it an madvise, to tell it your > intended access pattern would also be useful. > > I'm also not sure if the Linux VM "prefers" code pages to > data pages. It could very well be the case that it does; > that would result in a potentiall much better performance > on this test. It would also be useful to know the relative > load addresses in the code; FreeBSD might end up having the > code compiled to be split across cache lines, etc, where > the Linux version of the code does not. > > As other people pointed out, the "speed" of the swap > partition is also potentially an issue. Make sure that > FreBSD and Linux are using the same region relative to the > drive spindle for swap. > > In addition, you should verify that the hardware is, in > fact, identical. The easiest way to do this would be to > swap drives in the machines to see if the affects the results, > and -- while they are out -- verify that the drives themselves > are as identical as possible. > > You might also want to turn *off* the FreeBSD "harvesting > entropy", if it's doing it on disk interrupts or other > interrupts inportant to the code path. > > If all this still has the FreeBSD slower, it still, > unfortunately, isn't conclusive, one way or the other; it > could still be that what you are testing is not the swap > performance of FreeBSD, but, perhaps, the differences in > the disk device drivers for the particular controller you > ended up with in the motherboard lottery. > > It would also be useful to see the verbose dmesg output > for both systems for the devices involved in the test code > path. It may be that FreeBSD is working around a known > controller issue (e.g. the CMD640B IDE controller), etc., > where interleaved I/O's are being permitted by Linux, but > not by FreeBSD, for fear of data corruption. > > Finally... you might want to try the Linux version of the > program on FreeBSD, rather than using a native FreeBSD > version. THis should account for many things, including > the sync'ing of mapping regions, if that's a factor. > > All this information is useless to me personally; please > post to the list, if you post at all, thanks. > > -- Terry In fact I was starting these tests as a result of heavy mathematical operations (composing, compacting, minimizing automata's with a lot of states and much much more arcs between them). Our application that deals with this is written in C and is not optimized to any particular OS. If I had to optimize it for Linux or FreeBSD there certainly would be major changes, but our team uses not only *BSD. So when we start to build our automata's some of them require more than 1G to be created and most of the memory has temporary usage (there are most malloc, realloc, calloc, free operatons) because of atomic operations in algorithms for making automata's. And when we saw that one think on Linux was done for a few hours, but on FreeBSD much, much more, I start tests to investigate where the problem is. This test (malloc_t
Re: Swapping performance
On Thu, 7 Mar 2002 10:42:05 -0800 "David O'Brien" <[EMAIL PROTECTED]> wrote: > On Thu, Mar 07, 2002 at 08:09:06AM -0600, GB Clark wrote: > > > I've tested it with : > > > > > > cc -O6 -o malloc_test malloc_test.c > > > > That -O6 does not look right from here. Do we support anything over > > -O2? > > > > And how about some source for malloc_test.c? The fact of running > > something at -O6 started some bells ringing. > > Not us, but GCC does not support anything over -O3. -O4 and above are > treated as -O3. I *really* wish people would have a clue with with in > the hell they think they are achieving with -O. Not all > optimizations are appropriate in all cases. And given this level of > optimization and the fact that the linux box is probably a different > version of GCC, I wonder how much of this could be due to the compiler. > > Please rerun your tests with '/usr/bin/time -l' on FreeBSD and however > you achieve the same on Linux. Sorry, no -l on Linux box! > > P.S. are you sure you are swapping, vs. paging? -- Dimitar Peikov Programmer Analyst Globalization Group "We Build e-Business" RILA Solutions 27 Building, Acad.G.Bonchev Str. 1113 Sofia, Bulgaria phone: (+359 2) 9797320 phone: (+359 2) 9797300 fax: (+359 2) 9733355 http://www.rila.com To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
Re: Swapping performance
On Thu, 7 Mar 2002 11:41:28 + (GMT) Mike Silbersack <[EMAIL PROTECTED]> wrote: > > On Thu, 7 Mar 2002, cjp wrote: > > > In order to handle the kruft that occurs, there is the out of memory > > killer, oom_killer. > > Which merrily goes through the list of processes, killing off the low > > priority processes > > until enough memory is free to satisfy what was most recently used. > > It's the loan shark > > repayment program, with OOMKiller performing the function of the > > deliquency reminder. > > FreeBSD overcommits and has a OOMKiller too. You just haven't noticed it > because it's not triggered until you're out of swap space. > > The one thing that _does_ strike me as odd in this comparison is that > Dimitar is using 2.4.17. If that's 2.4.17, I'm surprised that it's > working ok, as everyone on the linux-kernel list seems to be applying > either the -AA or -rmap patches. Of course, if that's SUSE's 2.4.17, I > assume that the -AA patches are already applied. > Well, this SuSE is upgraded 7.1 installation, with no SuSE kernel downloaded from kernel.org). > In any case, we can't make any useful comparisons until Dimitar posts the > source to his test program. > > Dimitar, post the source for the test program! > > Mike "Silby" Silbersack > > > -- Dimitar Peikov Programmer Analyst Globalization Group "We Build e-Business" RILA Solutions 27 Building, Acad.G.Bonchev Str. 1113 Sofia, Bulgaria phone: (+359 2) 9797320 phone: (+359 2) 9797300 fax: (+359 2) 9733355 http://www.rila.com To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
Re: Swapping performance
On Thu, 7 Mar 2002 09:42:44 -0500 "cjp" <[EMAIL PROTECTED]> wrote: > This is a comparison of how fast Linux can do something > STUPID versus how fast a real OS can do something intelligently. Your > test is giving you misleading, and dangerous numbers. Do not go waving > them around until you have actually looked at mallocs behavior on the > different systems. In fact if I have to compute something really important for me (STUPID as you said) I would choose the fastest OS. I start this thread not to blame against *BSD architecture but the see if there is a way to fix this and to catch the right person who had more experience than me in this area! I have no idea to start anything that would be treated as blame against FreeBSD and against any of the developers who support it! Further more I prefer FreeBSD than Linux, but if I have to wait one day to calculate something on FreeBSD and to wait a few hours less using Linux I would run Linux or Solaris or whatever. If I don't like FreeBSD I would not post my letter, I don't like to loose my time with something that is STUPID! I don't know if your case is this! > > Here's why: > > Linux implements a brain dead memory allocation > scheme called memory overcommit. It will let you malloc > as much memory as you want whether it is available as RAM or not > and only bitch when you try to use the memory. Therefore, > Linux malloc is much faster than any reasonable system, since all it is > doing is handing out address space out of unallocated address space, > not keeping track of how much memory there actually is. > > In order to handle the kruft that occurs, there is the out of memory > killer, oom_killer. > Which merrily goes through the list of processes, killing off the low > priority processes > until enough memory is free to satisfy what was most recently used. It's > the loan shark > repayment program, with OOMKiller performing the function of the > deliquency reminder. > > On any of the BSD system, you actually get memory you can use, and all the > overhead > of assuring its existence at the time of allocation. Much more robust, > less prone to abuse. > > Try it, you'll like it. If you want the nuts and bolts of it, read the > source. > > > - Original Message - > From: "Dimitar Peikov" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Thursday, March 07, 2002 3:45 AM > Subject: Swapping performance > > > > I start some performance tests on -stable and on SuSE 7.1 / 2.4.17. I > > don't comment about 'bzero' performance, but when RAM is over, Linux > > is much faster. I have no idea what is the algorithm of swapping but it > > seems that the granularity of swapping pieces is the key or the > > importance of swapping memory blocks of certain task. Ooo I forgot to > > say that the both machines have the same hardware, IBM 300PL, 256 RAM > > and no other tasks running. I had to run these tests to choose the > > fastest platform for building our software indexes, which requires a lot > > of math and memory operations. > > > > --- with bzero --- > > Linux$ time ./malloc_test > > *# > > real0m37.640s > > user0m1.370s > > sys 0m2.950s > > Linux$ > > > > FreeBSD$ time ./malloc_test > > *# > > real0m46.640s > > user 0m2.280s > > sys 0m2.550s > > FreeBSD$ > > > > --- without bzero --- > > Linux$ time ./malloc_test > > *# > > real0m6.371s > > user0m0.450s > > sys 0m1.510s > > Linux$ > > > > FreeBSD$ time ./malloc_test > > *# > > real0m11.571s > > user0m1.150s > > sys 0m1.830s > > FreeBSD$ > > > > > > > > -- > > Dimitar Peikov > > Programmer Analyst > > Globalization Group > > "We Build e-Business" > > > > RILA Solutions > > 27 Building, Acad.G.Bonchev Str. > > 1113 Sofia, Bulgaria > > > > phone: (+359 2) 9797320 > > phone: (+359 2) 9797300 > > fax: (+359 2) 9733355 > > http://www.rila.com > > > -- Dimitar Peikov Programmer Analyst Globalization Group "We Build e-Business" RILA Solutions 27 Building, Acad.G.Bonchev Str. 1113 Sofia, Bulgaria phone: (+359 2) 9797320 phone: (+359 2) 9797300 fax: (+359 2) 9733355 http://www.rila.com To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
Re: Swapping performance
On Thu, 7 Mar 2002 08:09:06 -0600 GB Clark <[EMAIL PROTECTED]> wrote: > On Thu, 7 Mar 2002 14:27:59 +0200 > Dimitar Peikov <[EMAIL PROTECTED]> wrote: > > > On Thu, 7 Mar 2002 04:01:58 -0800 (PST) > > Julian Elischer <[EMAIL PROTECTED]> wrote: > > > > > he said -stable.. > > > > > > what are the malloc options on -stable? > > > > > > maybe we should make sure that they are null > > > > > > ln -s ">" /etc/malloc.conf > > > (I hope that helps) :) > > > > > > > I've tested it with : > > > > cc -O6 -o malloc_test malloc_test.c > > That -O6 does not look right from here. Do we support anything over -O2? > I've checked -O6 more complicated sources and they work just amazing! This is a GCC problem, not an OS specific feature. (I've use this and on Linux, OpenBSD, Solaris SPARC/Intel). Even if I compile it using -O2 the result is the same. FreeBSD machine always finish late! At this time I can't compare with Solaris, but OpenBSD got near the same performance. > And how about some source for malloc_test.c? The fact of running > something at -O6 started some bells ringing. > > > --SNIP-- > > GB > > -- > GB Clark II | Roaming FreeBSD Admin > [EMAIL PROTECTED] | General Geek >CTHULU for President - Why choose the lesser of two evils? -- Dimitar Peikov Programmer Analyst Globalization Group "We Build e-Business" RILA Solutions 27 Building, Acad.G.Bonchev Str. 1113 Sofia, Bulgaria phone: (+359 2) 9797320 phone: (+359 2) 9797300 fax: (+359 2) 9733355 http://www.rila.com To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
Re: Swapping performance
On Thu, 7 Mar 2002 04:01:58 -0800 (PST) Julian Elischer <[EMAIL PROTECTED]> wrote: > he said -stable.. > > what are the malloc options on -stable? > > maybe we should make sure that they are null > > ln -s ">" /etc/malloc.conf > (I hope that helps) :) > I've tested it with : cc -O6 -o malloc_test malloc_test.c ln -s ">>" /etc/malloc.conf ln -s "<<" /etc/malloc.conf ln -s "HR>>" /etc/malloc.conf ln -s "HR<<" /etc/malloc.conf and no significant performance issue between the tests. There were some differences but not amazing one. > > On Thu, 7 Mar 2002, Alfred Perlstein wrote: > > > * Dimitar Peikov <[EMAIL PROTECTED]> [020307 00:45] wrote: > > > I start some performance tests on -stable and on SuSE 7.1 / 2.4.17. I > > > don't comment about 'bzero' performance, but when RAM is over, Linux > > > is much faster. I have no idea what is the algorithm of swapping but > > > it seems that the granularity of swapping pieces is the key or the > > > importance of swapping memory blocks of certain task. Ooo I forgot to > > > say that the both machines have the same hardware, IBM 300PL, 256 RAM > > > and no other tasks running. I had to run these tests to choose the > > > fastest platform for building our software indexes, which requires a > > > lot of math and memory operations. > > > > Also, which version of FreeBSD? > > > > -- > > -Alfred Perlstein [[EMAIL PROTECTED]] > > 'Instead of asking why a piece of software is using "1970s technology," > > start asking why software is ignoring 30 years of accumulated wisdom.' > > Tax deductible donations for FreeBSD: http://www.freebsdfoundation.org/ > > > > To Unsubscribe: send mail to [EMAIL PROTECTED] > > with "unsubscribe freebsd-hackers" in the body of the message > > > -- Dimitar Peikov Programmer Analyst Globalization Group "We Build e-Business" RILA Solutions 27 Building, Acad.G.Bonchev Str. 1113 Sofia, Bulgaria phone: (+359 2) 9797320 phone: (+359 2) 9797300 fax: (+359 2) 9733355 http://www.rila.com To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
Swapping performance
I start some performance tests on -stable and on SuSE 7.1 / 2.4.17. I don't comment about 'bzero' performance, but when RAM is over, Linux is much faster. I have no idea what is the algorithm of swapping but it seems that the granularity of swapping pieces is the key or the importance of swapping memory blocks of certain task. Ooo I forgot to say that the both machines have the same hardware, IBM 300PL, 256 RAM and no other tasks running. I had to run these tests to choose the fastest platform for building our software indexes, which requires a lot of math and memory operations. --- with bzero --- Linux$ time ./malloc_test *# real0m37.640s user0m1.370s sys 0m2.950s Linux$ FreeBSD$ time ./malloc_test *# real0m46.640s user0m2.280s sys 0m2.550s FreeBSD$ --- without bzero --- Linux$ time ./malloc_test *# real0m6.371s user0m0.450s sys 0m1.510s Linux$ FreeBSD$ time ./malloc_test *# real0m11.571s user0m1.150s sys 0m1.830s FreeBSD$ -- Dimitar Peikov Programmer Analyst Globalization Group "We Build e-Business" RILA Solutions 27 Building, Acad.G.Bonchev Str. 1113 Sofia, Bulgaria phone: (+359 2) 9797320 phone: (+359 2) 9797300 fax: (+359 2) 9733355 http://www.rila.com malloc_test.c Description: Binary data
Magic number 100 in /sys/kern/kern_fork.c
I've review /sys/kern/kern_fork.c file and have a question why the room of 100 process numbers is hardcoded in the source? I think that if such room is needed, it must be defined somewhere in headers, isn't it. Can someone explain me more the idea about that room? -- Dimitar Peikov Programmer Analyst Globalization Group "We Build e-Business" RILA Solutions 27 Building, Acad.G.Bonchev Str. 1113 Sofia, Bulgaria phone: (+359 2) 9797320 phone: (+359 2) 9797300 fax: (+359 2) 9733355 http://www.rila.com To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
Re: Performance issue
On Fri, 14 Dec 2001 02:55:33 -0600 Alfred Perlstein <[EMAIL PROTECTED]> wrote: > * Kris Kennaway <[EMAIL PROTECTED]> [011214 02:46] wrote: > > > > Yes, well, we already compile the *entire tree* with static > > (compile-time) optimizations when CPUTYPE is set, so one more (bzero) > > is no difference except that it gives an extra performance benefit. > > Wait, you go to each and every freebsd install and do a make world? > > The point is we can do this dynamically, in fact we don't even need > to teach the linker how to do it, we can do it via the startup > scripts by checking a sysctl and providing the subdir to ldconfig. > > :) > > -- > -Alfred Perlstein [[EMAIL PROTECTED]] > 'Instead of asking why a piece of software is using "1970s technology," > start asking why software is ignoring 30 years of accumulated wisdom.' >http://www.morons.org/rants/gpl-harmful.php3 Yes, this would be great, but I think that bzero() is for example, there are too many functions from the libraries that could be optimized as well. These are all string and memory manipulation routines with extentions such us MMX, SIMD, 3dnow, ... This would not be 5 min implementation at all. -- Dimitar Peikov Programmer Analyst Globalization Group "We Build e-Business" RILA Solutions 27 Building, Acad.G.Bonchev Str. 1113 Sofia, Bulgaria phone: (+359 2) 9797320 phone: (+359 2) 9797300 fax: (+359 2) 9733355 http://www.rila.com To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
Re: Performance issue
On Sun, 09 Dec 2001 12:42:50 +0100 Poul-Henning Kamp <[EMAIL PROTECTED]> wrote: > > There are many effects that could cause this, for instance if FreeBSD > manages to align things differently in relation to the CPU cache you > could get some very interesting waste of time that way. Yes, I agree that in this case performance lost can be found in CPU Cache, but this can be true and when run on Linux, isn't it? > > Based on the data you show me, I can't really say that something is > wrong or right either way. Before I post this, I've got several experiments about that and the bottleneck was memory operations. The rest of my algorithm got near the same results. When perform only (malloc/free) operations without any touch of that allocated memory, there is no problem. The problem becames when you try to access it and only for the first memory hit. There is no mather if only one byte or whole memory block should be accessed, the difference is constantly the same. Or the problem is on all FreeBSD boxes installed near me? > > -- > Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 > [EMAIL PROTECTED] | TCP/IP since RFC 956 > FreeBSD committer | BSD since 4.3-tahoe > Never attribute to malice what can adequately be explained by incompetence. -- Dimitar Peikov Programmer Analyst Globalization Group "We Build e-Business" RILA Solutions 27 Building, Acad.G.Bonchev Str. 1113 Sofia, Bulgaria phone: (+359 2) 9797320 phone: (+359 2) 9797300 fax: (+359 2) 9733355 http://www.rila.com To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
Performance issue
Hi, It seems to me that something in memory allocation algorith is not right. When allocate memory using malloc() without touching it FreeBSD is faster than Linuxes. But when some access to this allocated memory is needed (in most cases when have to perform calculations on huge amount of data), something is going not very well. It happends that the same program with the same input data works a times slower than on Linux box. The hardware on both machines is the same, even more Linux box has less memory. And when swapping is going to transfer data from swap area into phisical memory, I think that the things are going much slower, I mean that FreeBSD is doing this slower. I'm trying to find the difference between both implementations on both allocation algorithms, to find the answer why the things are going so. If someone can explain me in more detail both swapping and allocation algorithms currently in use in FreeBSD (I've read /usr/src/lib/libc/stdlib/malloc.c and have compl! etely agreed with it, with 1 exception), please help me. PS: I'm not trying to compare both OS-es but I'm curious on this performance issue. On FreeBSD 4.4 Stable from Nov 22 2001 100 iterations without bzero : FreeBSD$ time ./malloc_test real0m5.706s user0m3.169s sys 0m2.487s 1 iterations with bzero : FreeBSD$ time ./malloc_test real0m47.915s user0m12.369s sys 0m34.681s On SuSE Linux host1 2.4.0 100 iterations without bzero : SuSE$ time malloc_test real0m14.417s user0m1.370s sys 0m13.040s 1 iterations with bzero : SuSE$ time malloc_test real0m34.364s user0m3.630s sys 0m30.710s -------- -- Dimitar Peikov Programmer Analyst Globalization Group "We Build e-Business" RILA Solutions 27 Building, Acad.G.Bonchev Str. 1113 Sofia, Bulgaria phone: (+359 2) 9797320 phone: (+359 2) 9797300 fax: (+359 2) 9733355 http://www.rila.com malloc_test.c Description: Binary data
sysctl and MAXDSIZ
I have a need dynamicaly to change maxdatasize limit for user in order to make some experiences on my work. Give me some advise for non-reboot change to do this? I found 'options MAXDSIZ' in LINT that helps me at that moment but as I so at kern/subr_param.c there is : TUNABLE_QUAD_FETCH("kern.maxdsiz", &maxdsiz); but sysctl gives to me no 'kern.maxdsiz' resource. Is there a problem to put this parameter into sysctl (writable) or there are more changes to do to avoid crashes if they appears when change is made? PS: Cc: me because I'm not at the list. -- Dimitar Peikov Programmer Analyst Globalization Group "We Build e-Business" RILA Solutions 27 Building, Acad.G.Bonchev Str. 1113 Sofia, Bulgaria phone: (+359 2) 9797320 phone: (+359 2) 9797300 fax: (+359 2) 9733355 http://www.rila.com To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
IPFW module
This morning I've cvsuped to STABLE and put 'options IPFIREWALL' into my kernel configuration file. After installing all I try to 'kldload ipfw' which complains that ipfw module is already in kernel, but kldstat reports that module is being loaded! Then I've decided to kldunload it Kernel panic reboot! It is regular to kernel crash if ipfw is loaded as module, but why when it was build into kernel? In that case it would be good kldload/kldunload to exit! Why kldload loads module in case that it is compiled in kernel? -- Dimitar Peikov Programmer Analyst Globalization Group "We Build e-Business" RILA Solutions 27 Building, Acad.G.Bonchev Str. 1113 Sofia, Bulgaria phone: (+359 2) 9797320 phone: (+359 2) 9797300 fax: (+359 2) 9733355 http://www.rila.com To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
Re: Sound card support
http://www.katsurajima.seya.yokohama.jp/ich/ Have fun. It works fine for me! -- Dimitar Peikov Programmer Analyst "We Build e-Business" RILA Solutions 27 Building, Acad.G.Bonchev Str. 1113 Sofia, Bulgaria home: (+359 2) 595495 phone: (+359 2) 9797320 phone: (+359 2) 9797300 fax: (+359 2) 9733355 http://www.rila.com To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
4.1 ISO CRC
Hi, Could someone send me CRC code for the 4.1 ISO image or to be available on ftp server for downloading? -- Dimitar Peikov To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
mmap syncs and file extends
Hi, hackers, I've try to use mmap() and resize the mapping. msync() syncronizes only the memory that was mmapped with mmap(). How can I extend the main file? Memory is filled correctly, but I must write extended data to file by hand. In my examples 'x.txt' was 11 bytes (some text); Where I'm wrong? -- #include #include #include #include #include int main() { char *ptr; int fd, size=20; fd = open("x.txt", O_RDWR | O_CREAT); ptr = mmap(0, 15, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0); ptr[0] = 'D'; ptr[6] = 'D'; ptr = mremap(ptr, 10, 20, 1); close(fd); ptr[10] = 'Y'; ptr[12] = 'X'; printf("1%C\n", ptr[12]); msync(ptr, size, MS_SYNC); munmap(ptr, size); } -- -- Dimitar Peikov Programmer "We Build e-Business" RILA Solutions 27 Building, Acad.G.Bonchev Str. 1113 Sofia, Bulgaria home: (+359 2) 595495 phone: (+359 2) 9797320 phone: (+359 2) 9797300 fax: (+359 2) 9733355 http://www.rila.com To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
Routing problem
Hi, I have the following problem and cant see where I wrong or there is another way to do it. Problem: I have one segment in wich are connected different networks. in this case I try to use one workstation using Windows with alone IP -> let it be 192.168.1.1/32 and my freebsd uses 192.168.0.1/24 . The other Win I could setup to see this alone workstation using routing information but in my freebsd machine when I set using : route add -host 192.168.1.1 -netmask 255.255.255.255 -interface ed0 My arp table says that ed0 has IP 192.168.1.1 ? If set using : route add -host 192.168.1.1 -netmask 255.255.255.255 192.168.0.1 My arp says nothing, but ping returns routing errors In fact I cannot route alone IP trought interface. It have no sense but in my case I must use tricks doing that!!! Could someone can explain me how to solve that problem? I see that 2 Windowses in this configuration have ping between, but ping between freebsd and that Windows - no! Mitko P.S.: I forgot that currently I use 3.1 release. To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
HZ changing
One question? Changing HZ in kernel config with lower than 10, for example HZ=5, stops some communications. It's true that machine goes faster to response for user activity, but some devices stop to work? Is it normal? Mitko To Unsubscribe: send mail to majord...@freebsd.org with "unsubscribe freebsd-hackers" in the body of the message
HZ changing
One question? Changing HZ in kernel config with lower than 10, for example HZ=5, stops some communications. It's true that machine goes faster to response for user activity, but some devices stop to work? Is it normal? Mitko To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message