>>могу предположить что в ядре:
>>
>>maxusers 0
>>
>>- не советую использовать такое значение в ядре (в документации пишется якобы
>>что
>>это означает auto-tunable ядро - фигня)
>>
>># less /sys/conf/NOTES
>>...
>>ниже описание ЧТО это, для ЧЕГО, с чем связано и как примерно
>>высчитывается:
>>
>># Set the number of sf_bufs to allocate. sf_bufs are virtual buffers
>>
>># for sendfile(2) that are used to map file VM pages, and
>>normally
>># default to a quantity that is roughly 16*MAXUSERS+512. You would
>># typically want about 4 of these for each simultaneous file send.
>>
>>#
>>options NSFBUFS=1024
>>...
>
>
>Да, еще может влиять securelevel:
>
># man securelevel
># sysctl -a | grep securelevel (переменная ядра kern.securelevel) Еще раз благодарю за внимание к теме!
При сборке ядра значение maxusers=0 (сейчас maxusers=384), но не думаю, что причина имеено в нем.
Дело в том, что на соседней машине с 5.5 и такой же конфигурацией (за исключением того, что машина I386, а не amd64+SMP как в случае с 6.1) и тех же манипуляциях, все нормально.
пример 5.5
# sysctl -a | grep kern
kern.securelevel: -1
kern.ostype: FreeBSD
kern.osrelease: 5.5-RELEASE
kern.osrevision: 199506
kern.version: FreeBSD 5.5-RELEASE #1: Mon Aug 14 17:52:23 MSD 2006
kern.maxvnodes: 69672
kern.maxproc: 6164
kern.maxfiles: 12328
kern.argmax: 65536
kern.securelevel: -1
kern.hostname: unknown
kern.hostid: 0
kern.clockrate: { hz = 100, tick = 10000, profhz = 1024, stathz = 128 }
kern.posix1version: 200112
kern.ngroups: 16
kern.job_control: 1
kern.saved_ids: 0
kern.boottime: { sec = 1156971270, usec = 840647 } Thu Aug 31 00:54:30 2006
kern.domainname:
kern.osreldate: 505000
kern.bootfile: /boot/kernel/kernel
kern.maxfilesperproc: 11095
kern.maxprocperuid: 5547
kern.ipc.maxsockbuf: 262144
kern.ipc.sockbuf_waste_factor: 8
kern.ipc.somaxconn: 1024
kern.ipc.max_linkhdr: 16
kern.ipc.max_protohdr: 40
kern.ipc.max_hdr: 56
kern.ipc.max_datalen: 152
kern.ipc.nmbclusters: 32000
kern.ipc.maxpipekva: 16777216
kern.ipc.pipes: 6
kern.ipc.pipekva: 49152
kern.ipc.pipefragretry: 0
kern.ipc.pipeallocfail: 0
kern.ipc.piperesizefail: 0
kern.ipc.piperesizeallowed: 1
kern.ipc.msgmax: 16384
kern.ipc.msgmni: 40
kern.ipc.msgmnb: 2048
kern.ipc.msgtql: 40
kern.ipc.msgssz: 8
kern.ipc.msgseg: 2048
kern.ipc.semmap: 30
kern.ipc.semmni: 10
kern.ipc.semmns: 60
kern.ipc.semmnu: 30
kern.ipc.semmsl: 60
kern.ipc.semopm: 100
kern.ipc.semume: 10
kern.ipc.semusz: 92
kern.ipc.semvmx: 32767
kern.ipc.semaem: 16384
kern.ipc.shmmax: 33554432
kern.ipc.shmmin: 1
kern.ipc.shmmni: 192
kern.ipc.shmseg: 128
kern.ipc.shmall: 8192
kern.ipc.shm_use_phys: 0
kern.ipc.shm_allow_removed: 0
kern.ipc.numopensockets: 27
kern.ipc.maxsockets: 12328
kern.ipc.nsfbufs: 6656
kern.ipc.nsfbufspeak: 3
kern.ipc.nsfbufsused: 0
kern.dummy: 0
kern.ps_strings: 3217031152
kern.usrstack: 3217031168
kern.logsigexit: 1
kern.iov_max: 1024
kern.disks: ad6 ad4
kern.geom.debugflags: 0
kern.geom.collectstats: 1
kern.elf32.fallback_brand: -1
kern.init_path: /sbin/init:/sbin/oinit:/sbin/init.bak:/rescue/init:/stand/sysinstall
kern.init_shutdown_timeout: 120
kern.acct_suspend: 2
kern.acct_resume: 4
kern.acct_chkfreq: 15
kern.cp_time: 1206 0 4661 3581 7265491
kern.openfiles: 107
kern.kq_calloutmax: 4096
kern.stackprot: 7
kern.ps_arg_cache_limit: 256
kern.lastpid: 2831
kern.randompid: 0
kern.module_path: /boot/kernel;/boot/modules
kern.malloc:
kern.ident: ALFA
kern.maxusers: 384
kern.fallback_elf_brand: -1
kern.kstack_pages: 2
kern.sync_on_panic: 0
kern.shutdown.poweroff_delay: 5000
kern.shutdown.kproc_shutdown_wait: 60
kern.sugid_coredump: 0
kern.coredump: 1
kern.nodump_coredump: 0
kern.corefile: %N.core
kern.fscale: 2048
kern.timecounter.stepwarnings: 0
kern.timecounter.nbinuptime: 17007719
kern.timecounter.nnanouptime: 0
kern.timecounter.nmicrouptime: 2898
kern.timecounter.nbintime: 596798
kern.timecounter.nnanotime: 163191
kern.timecounter.nmicrotime: 433385
kern.timecounter.ngetbinuptime: 0
kern.timecounter.ngetnanouptime: 2535
kern.timecounter.ngetmicrouptime: 1773587
kern.timecounter.ngetbintime: 0
kern.timecounter.ngetnanotime: 0
kern.timecounter.ngetmicrotime: 14259
kern.timecounter.nsetclock: 2
kern.timecounter.hardware: ACPI-fast
kern.timecounter.choice: TSC(800) ACPI-fast(1000) i8254(0) dummy(-1000000)
kern.timecounter.tick: 1
kern.threads.thr_scope_sys: 0
kern.threads.thr_concurrency: 0
kern.threads.debug: 0
kern.threads.max_threads_per_proc: 1500
kern.threads.max_groups_per_proc: 1500
kern.threads.max_threads_hits: 0
kern.threads.virtual_cpu: 1
kern.sched.name: 4BSD
kern.sched.quantum: 100000
kern.sched.followon: 0
kern.sched.pfollowons: 0
kern.sched.kgfollowons: 0
kern.ccpu: 1948
kern.devstat.numdevs: 2
kern.devstat.generation: 122
kern.devstat.version: 6
kern.kobj_methodcount: 73
kern.log_wakeups_per_second: 5
kern.log_console_output: 1
kern.always_console_output: 0
kern.msgbuf: to stop...
kern.msgbuf_clear: 0
kern.smp.maxcpus: 1
kern.smp.active: 0
kern.smp.disabled: 0
kern.smp.cpus: 1
kern.nselcoll: 0
kern.drainwait: 300
kern.tty_nin: 1138
kern.tty_nout: 81902
kern.console: consolectl,/ttyd0,consolectl,
kern.consmute: 0
kern.consmsgbuf_size: 8192
kern.constty_wakeups_per_second: 5
kern.rootdev: ad4s1a
kern.filedelay: 30
kern.dirdelay: 29
kern.metadelay: 28
kern.minvnodes: 17418
kern.chroot_allow_open_directories: 1
kern.random.yarrow.gengateinterval: 10
kern.random.yarrow.bins: 10
kern.random.yarrow.fastthresh: 192
kern.random.yarrow.slowthresh: 256
kern.random.yarrow.slowoverthresh: 2
kern.random.sys.seeded: 1
kern.random.sys.harvest.ethernet: 1
kern.random.sys.harvest.point_to_point: 1
kern.random.sys.harvest.interrupt: 1
kern.random.sys.harvest.swi: 0
machdep.adjkerntz: 0
пример 6.1
# sysctl -a | grep securelevel
kern.ostype: FreeBSD
kern.osrelease: 6.1-RELEASE
kern.osrevision: 199506
kern.version: FreeBSD 6.1-RELEASE #0: Thu Aug 17 23:00:30 MSD 2006
kern.maxvnodes: 100000
kern.maxproc: 6164
kern.maxfiles: 12328
kern.argmax: 262144
kern.securelevel: -1
kern.hostname: unknown2
kern.hostid: 0
kern.clockrate: { hz = 1000, tick = 1000, profhz = 666, stathz = 133 }
kern.posix1version: 200112
kern.ngroups: 16
kern.job_control: 1
kern.saved_ids: 0
kern.boottime: { sec = 1157025499, usec = 929459 } Thu Aug 31 15:58:19 2006
kern.domainname:
kern.osreldate: 601000
kern.bootfile: /boot/kernel/kernel
kern.maxfilesperproc: 11095
kern.maxprocperuid: 5547
kern.ipc.maxsockbuf: 262144
kern.ipc.sockbuf_waste_factor: 8
kern.ipc.somaxconn: 2048
kern.ipc.max_linkhdr: 16
kern.ipc.max_protohdr: 40
kern.ipc.max_hdr: 56
kern.ipc.max_datalen: 120
kern.ipc.nmbjumbo16: 0
kern.ipc.nmbjumbo9: 0
kern.ipc.nmbjumbop: 0
kern.ipc.nmbclusters: 32000
kern.ipc.piperesizeallowed: 1
kern.ipc.piperesizefail: 0
kern.ipc.pipeallocfail: 0
kern.ipc.pipefragretry: 0
kern.ipc.pipekva: 65536
kern.ipc.pipes: 8
kern.ipc.maxpipekva: 20971520
kern.ipc.msgseg: 2048
kern.ipc.msgssz: 8
kern.ipc.msgtql: 40
kern.ipc.msgmnb: 2048
kern.ipc.msgmni: 40
kern.ipc.msgmax: 16384
kern.ipc.semaem: 16384
kern.ipc.semvmx: 32767
kern.ipc.semusz: 104
kern.ipc.semume: 10
kern.ipc.semopm: 100
kern.ipc.semmsl: 60
kern.ipc.semmnu: 30
kern.ipc.semmns: 60
kern.ipc.semmni: 10
kern.ipc.semmap: 30
kern.ipc.shm_allow_removed: 0
kern.ipc.shm_use_phys: 0
kern.ipc.shmall: 8192
kern.ipc.shmseg: 128
kern.ipc.shmmni: 192
kern.ipc.shmmin: 1
kern.ipc.shmmax: 33554432
kern.ipc.numopensockets: 12
kern.ipc.maxsockets: 25600
kern.ipc.nsfbufsused: 0
kern.ipc.nsfbufspeak: 0
kern.ipc.nsfbufs: 0
kern.dummy: 0
kern.ps_strings: 140737488355296
kern.usrstack: 140737488355328
kern.logsigexit: 1
kern.iov_max: 1024
kern.cam.cam_srch_hi: 0
kern.cam.scsi_delay: 5000
kern.cam.cd.changer.max_busy_seconds: 15
kern.cam.cd.changer.min_busy_seconds: 5
kern.cam.da.default_timeout: 60
kern.cam.da.retry_count: 4
kern.cam.da.0.minimum_cmd_size: 6
kern.cam.da.1.minimum_cmd_size: 6
kern.cam.da.2.minimum_cmd_size: 6
kern.disks: da2 da1 da0 amrd0
kern.geom.collectstats: 1
kern.geom.debugflags: 0
kern.elf64.fallback_brand: -1
kern.init_shutdown_timeout: 120
kern.init_path: /sbin/init:/sbin/oinit:/sbin/init.bak:/rescue/init:/stand/sysinstall
kern.acct_suspended: 0
kern.acct_chkfreq: 15
kern.acct_resume: 4
kern.acct_suspend: 2
kern.cp_time: 310 1 4173 3792 1304570
kern.openfiles: 105
kern.kq_calloutmax: 4096
kern.ps_arg_cache_limit: 256
kern.stackprot: 7
kern.randompid: 0
kern.lastpid: 863
kern.module_path: /boot/kernel;/boot/modules
kern.malloc_count: 163
kern.malloc:
kern.fallback_elf_brand: -1
kern.maxusers: 384
kern.ident: AMD_SMP
kern.kstack_pages: 4
kern.shutdown.kproc_shutdown_wait: 60
kern.shutdown.poweroff_delay: 5000
kern.sync_on_panic: 0
kern.corefile: %N.core
kern.nodump_coredump: 0
kern.coredump: 1
kern.sugid_coredump: 0
kern.fscale: 2048
kern.timecounter.tick: 1
kern.timecounter.choice: TSC(-100) ACPI-fast(1000) i8254(0) dummy(-1000000)
kern.timecounter.hardware: ACPI-fast
kern.timecounter.nsetclock: 2
kern.timecounter.ngetmicrotime: 72951
kern.timecounter.ngetnanotime: 0
kern.timecounter.ngetbintime: 0
kern.timecounter.ngetmicrouptime: 82013
kern.timecounter.ngetnanouptime: 115
kern.timecounter.ngetbinuptime: 971
kern.timecounter.nmicrotime: 22951
kern.timecounter.nnanotime: 20340
kern.timecounter.nbintime: 43288
kern.timecounter.nmicrouptime: 894
kern.timecounter.nnanouptime: 0
kern.timecounter.nbinuptime: 1005048
kern.timecounter.stepwarnings: 0
kern.timecounter.smp_tsc: 0
kern.threads.thr_concurrency: 0
kern.threads.thr_scope: 0
kern.threads.virtual_cpu: 4
kern.threads.max_threads_hits: 0
kern.threads.max_groups_per_proc: 1500
kern.threads.max_threads_per_proc: 1500
kern.threads.debug: 0
kern.sched.preemption: 1
kern.sched.slice_max: 142
kern.sched.slice_min: 10
kern.sched.name: ule
kern.ccpu: 1948
kern.devstat.version: 6
kern.devstat.generation: 139
kern.devstat.numdevs: 7
kern.kobj_methodcount: 78
kern.log_wakeups_per_second: 5
kern.msgbuf_clear: 0
kern.msgbuf:
kern.always_console_output: 0
kern.log_console_output: 1
kern.smp.forward_roundrobin_enabled: 1
kern.smp.forward_signal_enabled: 1
kern.smp.cpus: 4
kern.smp.disabled: 0
kern.smp.active: 1
kern.smp.maxcpus: 16
kern.nselcoll: 0
kern.tty_nout: 1116912
kern.tty_nin: 7818
kern.drainwait: 300
kern.constty_wakeups_per_second: 5
kern.consmsgbuf_size: 8192
kern.consmute: 0
kern.console: consolectl,/ttyd0,consolectl,
kern.minvnodes: 25000
kern.metadelay: 28
kern.dirdelay: 29
kern.filedelay: 30
kern.chroot_allow_open_directories: 1
kern.elf32.fallback_brand: -1
kern.random.yarrow.gengateinterval: 10
kern.random.yarrow.bins: 10
kern.random.yarrow.fastthresh: 192
kern.random.yarrow.slowthresh: 256
kern.random.yarrow.slowoverthresh: 2
kern.random.sys.seeded: 1
kern.random.sys.harvest.ethernet: 1
kern.random.sys.harvest.point_to_point: 1
kern.random.sys.harvest.interrupt: 1
kern.random.sys.harvest.swi: 0
machdep.adjkerntz: 0
Вот не меняется оно и все, хоть кол на голове чиши!
К сожалению, под рукой нет второй платформы amd64, что бы провести следственный эксперимент ;)