zfs & waiting on zio->io_cv

2008-10-24 Thread Danny Braniss
there is a big delay (probably more than 1 sec.) when doing simple tasks
on this zfs, like ls(1), or 'zfs list', long enough to hit ^T
and get the same [zio->io_cv)], any hints?

store-01# zfs list
(hitting ^T)load: 0.00  cmd: zfs 88376 [zio->io_cv)] 0.00u 0.00s 0% 1672k
(hitting ^T)load: 0.00  cmd: zfs 88376 [zio->io_cv)] 0.00u 0.00s 0% 1684k
NAME  USED  AVAIL  REFER  MOUNTPOINT
h 472G  11.2T23K  /h
h/home466G  11.2T   466G  /h/home
h/[EMAIL PROTECTED]54K  -   466G  -
h/root 18K  11.2T18K  /h/root
h/src  18K  11.2T18K  /h/src
h/system 5.64G  11.2T  5.64G  /h/system

cheers,
danny


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


Re: Why does adding /usr/lib32 to LD_LIBRARY_PATH break 64-bit binaries?

2008-10-24 Thread Wojciech Puchar

6.1-RELEASE-amd64 machine.  If I add /usr/lib32 to my LD_LIBRARY_PATH
it breaks all of my binaries on my 64-bit machine.


what do you expect else?

this will make system trying to bind 32-bit libs to 64-bit program. it 
can't work

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


Re: Why does adding /usr/lib32 to LD_LIBRARY_PATH break 64-bit binaries?

2008-10-24 Thread Peter Jeremy
On 2008-Oct-24 10:43:04 +0200, Wojciech Puchar <[EMAIL PROTECTED]> wrote:
>> 6.1-RELEASE-amd64 machine.  If I add /usr/lib32 to my LD_LIBRARY_PATH
>> it breaks all of my binaries on my 64-bit machine.
>
>what do you expect else?

Well, the rtld should be smart enough to recognize 32-bit .so's and
skip them when binding a 64-bit executable.  Whilst having /usr/lib32
in LD_LIBRARY_PATH doesn't make sense from a solely FreeBSD perspective,
I have done similar things when writing cross-platform scripts (to
avoid having to use platform-dependent code).

>this will make system trying to bind 32-bit libs to 64-bit program. it 
>can't work

rtld shouldn't attempt to bind 32-bit libs to 64-bit programs.

-- 
Peter Jeremy
Please excuse any delays as the result of my ISP's inability to implement
an MTA that is either RFC2821-compliant or matches their claimed behaviour.


pgpyzRP0cCICr.pgp
Description: PGP signature


Severe DNS Problems, 6.2-RELEASE, BIND 9.5.2

2008-10-24 Thread george+freebsd
I'm having severe DNS problems.  I'm running 6.2-RELEASE, and I upgraded
to the bind9 port (after cvsup) on July 14.  Starting yesterday morning,
DNS became very, very slow.  If I repeated a "dig" command three or four
times, I could get an answer after 20-30 seconds.  This morning I cvsupped
again and installed the bind95 port.  Still very, very slow.  I will
probably shift my server to a FreeBSD 7.0 system this weekend, but I
would like very much to understand what's going on.
-- George Mitchell

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


Re: zfs & waiting on zio->io_cv

2008-10-24 Thread Dan Nelson
In the last episode (Oct 24), Danny Braniss said:
> there is a big delay (probably more than 1 sec.) when doing simple tasks
> on this zfs, like ls(1), or 'zfs list', long enough to hit ^T
> and get the same [zio->io_cv)], any hints?
> 
> store-01# zfs list
> (hitting ^T)load: 0.00  cmd: zfs 88376 [zio->io_cv)] 0.00u 0.00s 0% 1672k
> (hitting ^T)load: 0.00  cmd: zfs 88376 [zio->io_cv)] 0.00u 0.00s 0% 1684k
> NAME  USED  AVAIL  REFER  MOUNTPOINT
> h 472G  11.2T23K  /h
> h/home466G  11.2T   466G  /h/home
> h/[EMAIL PROTECTED]54K  -   466G  -
> h/root 18K  11.2T18K  /h/root
> h/src  18K  11.2T18K  /h/src
> h/system 5.64G  11.2T  5.64G  /h/system

That's sort of the equivalent to waiting in "biord" on a UFS
filesystem, I think.  ZFS is just waiting for the disk to return a
block.  If you happen to do something during the window where ZFS is
commiting its transaction group, it has to wait until the sync
finishes.  If some other process is doing a lot of writes, or you only
have one disk in your zpool, or your pool is close to full, it may take
a couple seconds to sync.

There's a couple of things you can try to improve interactive
performance.  Raising zfs's arc_max is the easiest to do, and will let
ZFS cache more stuff, increasing the likelyhood that an "ls" will be
able to read from cache instead of having to go to disk.  Setting it at
1/4 your physical RAM is probably as high as you can go without causing
panics.

Raising txg_time ( in /sys/cddl/.../zfs/txg.c ) from 5 to
say 30 will tell zfs to sync less often, which can be a win if you
don't actually do that much writing.  With a single spindle, it may
take a substantial fraction of a second just to sync a tiny txg due to
the number of copies of metadata ZFS writes for redundancy.

If you do a lot of writing, lowering zfs_vdev_max_pending ( in
/sys/cddl/.../zfs/vdev_queue.c ) from 35 down to 16 or less will reduce
the number of simultaneous I/Os ZFS will try to send to each disk,
which will let your reads compete a little better with other I/O.  On
ATA or SATA disks, you might want to set it to 2.

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


question about sb->st_blksize in src/sys/kern/vfs_vnops.c

2008-10-24 Thread Thierry Herbelot
Hello,

the [SUBJ] file contains the following extract (around line 705) :

 * Default to PAGE_SIZE after much discussion.
 * XXX: min(PAGE_SIZE, vp->v_bufobj.bo_bsize) may be more correct.
 */

sb->st_blksize = PAGE_SIZE;

which arrived around four years ago, with revision 1.211 (see 
http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/kern/vfs_vnops.c.diff?r1=1.210;r2=1.211;f=h)

the net effect of this change is to decrease the block buffer size used in 
libc/stdio from 16 kbytes (derived from the underlying ufs partition) to 
PAGE_SIZE ==4 kbytes (fixed value), and consequently the I/O bandwidth is 
lowered (this is on a slow Flash).

I have patched the kernel with a larger, fixed value (simply 4*PAGE_SIZE, to 
revert to the block size previoulsly used), and the kernel and world seem to 
be running fine.

Seeing the XXX coment above, I'm a bit worried about keeping this new 
st_blksize value.

are there any drawbacks with running with this bigger buffer size value ?

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


Re: Severe DNS Problems, 6.2-RELEASE, BIND 9.5.2

2008-10-24 Thread Matthew Seaman

[EMAIL PROTECTED] wrote:

I'm having severe DNS problems.  I'm running 6.2-RELEASE, and I upgraded
to the bind9 port (after cvsup) on July 14.  Starting yesterday morning,
DNS became very, very slow.  If I repeated a "dig" command three or four
times, I could get an answer after 20-30 seconds.  This morning I cvsupped
again and installed the bind95 port.  Still very, very slow.  I will
probably shift my server to a FreeBSD 7.0 system this weekend, but I
would like very much to understand what's going on.


Did you configure DLV (DNSSEC Look-aside Validation)?  If so, you were 
probably bitten by the ISC key timing out.  Key roll-over was scheduled 
for the month leading up to Tuesday 21st.


Get the new key from: https://secure.isc.org/ops/dlv/index.php#dlv_key

Cheers,

Matthew

--
Dr Matthew J Seaman MA, D.Phil.   7 Priory Courtyard
 Flat 3
PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate
 Kent, CT11 9PW



signature.asc
Description: OpenPGP digital signature


libusb for linux-emulation

2008-10-24 Thread Martin Laabs
Hi,

I'd like to run a program in linux-emulation (closed source ...)
which uses the libusb. Is the structure (ioctls on devices and so on) 
sufficient compatible to use a linux libusb?
Or is there any way to build a simple wrapper library to use the
nativ libusb? (IMHO this is not possible.)
Do you have any other idea?

Thank you,
 Martin L.


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


Re: libusb for linux-emulation

2008-10-24 Thread Hans Petter Selasky
On Friday 24 October 2008, Martin Laabs wrote:
> Hi,
>
> I'd like to run a program in linux-emulation (closed source ...)
> which uses the libusb. Is the structure (ioctls on devices and so on)
> sufficient compatible to use a linux libusb?
> Or is there any way to build a simple wrapper library to use the
> nativ libusb? (IMHO this is not possible.)
> Do you have any other idea?
>

No, you cannot use the linux libusb on FreeBSD. You need to use the FreeBSD 
compiled libusb. The USB kernel interfaces are quite different.

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


Re: libusb for linux-emulation

2008-10-24 Thread Martin Laabs
Hi,

On Fri, 24 Oct 2008 19:51:31 +0200, Hans Petter Selasky <[EMAIL PROTECTED]> 
wrote:

>
> No, you cannot use the linux libusb on FreeBSD. You need to use the FreeBSD
> compiled libusb. The USB kernel interfaces are quite different.

OK - I see. I'm just trying to build a "hermaphrodite" library. Compile with
linux but using the BSD ioctls.
Is there a crosscompiler to compile linux binarys from freebsd? This would
make the job much easier.

Thank you,
 Martin L.

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


Re: libusb for linux-emulation

2008-10-24 Thread Hans Petter Selasky
Hi Martin,

Why can't you use and install:

/usr/ports/devel/libusb

?

--HPS

On Friday 24 October 2008, Martin Laabs wrote:
> Hi,
>
> On Fri, 24 Oct 2008 19:51:31 +0200, Hans Petter Selasky <[EMAIL PROTECTED]> 
wrote:
> > No, you cannot use the linux libusb on FreeBSD. You need to use the
> > FreeBSD compiled libusb. The USB kernel interfaces are quite different.
>
> OK - I see. I'm just trying to build a "hermaphrodite" library. Compile
> with linux but using the BSD ioctls.
> Is there a crosscompiler to compile linux binarys from freebsd? This would
> make the job much easier.
>



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


neophyte: tcsetattr() gives 22 error in i386, not in amd64?

2008-10-24 Thread Steve Franks
Hi,

I'm getting a 22 errno from tcsetattr() on 7-STABLE i386 in code which
was working under 7-STABLE amd64.  Serial device is a ucom (silabs
cp2103).  Permissions on /dev/cuaU0 look fine.  Cutecom/Minicom
appears to open the port without error...

Ideas?

Thanks,
Steve

if(cfsetspeed(&IspEnvironment->newtio,(speed_t)
strtol(IspEnvironment->baud_rate,NULL,10))) {

  DebugPrintf(1, "baudrate %s not supported\n",
IspEnvironment->baud_rate);

  exit(3);

  };


switch (atol(IspEnvironment->baud_rate))

{

  case 1152000: NEWTERMIOS_SETBAUDARTE(B1152000); break;


  default:

  {

  DebugPrintf(1, "unknown baudrate %s\n",
IspEnvironment->baud_rate);

  exit(3);

  }

}



IspEnvironment->newtio.c_iflag = IGNPAR | IGNBRK | IXON | IXOFF;

IspEnvironment->newtio.c_oflag = 0;



/* set input mode (non-canonical, no echo,...) */

IspEnvironment->newtio.c_lflag = 0;



cfmakeraw(&IspEnvironment->newtio);

IspEnvironment->newtio.c_cc[VTIME]= 1;   /* inter-character
timer used */

IspEnvironment->newtio.c_cc[VMIN] = 0;   /* blocking read
until 0 chars received */



tcflush(IspEnvironment->fdCom, TCIFLUSH);

int err = tcsetattr(IspEnvironment->fdCom, TCSANOW, 
&IspEnvironment->newtio);
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: neophyte: tcsetattr() gives 22 error in i386, not in amd64?

2008-10-24 Thread Nate Eldredge

On Fri, 24 Oct 2008, Steve Franks wrote:


Hi,

I'm getting a 22 errno from tcsetattr() on 7-STABLE i386 in code which
was working under 7-STABLE amd64.  Serial device is a ucom (silabs
cp2103).  Permissions on /dev/cuaU0 look fine.  Cutecom/Minicom
appears to open the port without error...


I don't see anything obviously wrong, but I'd bet a bug related to 
32/64-bit types.  Can you post a complete piece of code that can be 
compiled and run and demonstrates the problem?  Also, try compiling with 
-Wall -W and investigate any warnings that are produced.


By the way, errno 22 is EINVAL, "Invalid argument".  perror() is your 
friend.


[snip code]

--

Nate Eldredge
[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: Severe DNS Problems, 6.2-RELEASE, BIND 9.5.2

2008-10-24 Thread george+freebsd
> From: Matthew Seaman <[EMAIL PROTECTED]>
> [EMAIL PROTECTED] wrote:
> > I'm having severe DNS problems.  I'm running 6.2-RELEASE, and I upgrade=
> d
> > to the bind9 port (after cvsup) on July 14.  Starting yesterday morning=
> ,
> > DNS became very, very slow.  If I repeated a "dig" command three or fou=
> r
> > times, I could get an answer after 20-30 seconds.  This morning I cvsup=
> ped
> > again and installed the bind95 port.  Still very, very slow.  I will
> > probably shift my server to a FreeBSD 7.0 system this weekend, but I
> > would like very much to understand what's going on.
> 
> Did you configure DLV (DNSSEC Look-aside Validation)?  If so, you were=20
> probably bitten by the ISC key timing out.  Key roll-over was scheduled=20
> for the month leading up to Tuesday 21st.
> 
> Get the new key from: https://secure.isc.org/ops/dlv/index.php#dlv_key
> 
>   Cheers,
> 
>   Matthew

No, I'm not using DLV, but thanks for the hint anyway.

> From: Mike Meyer <[EMAIL PROTECTED]>
> X-Spam-Score: 0 () 
> X-Scanned-By: MIMEDefang 2.57 on 10.100.0.247
> X-Greylist: Delayed for 00:52:50 by milter-greylist-2.0.2 (mailhost.m5p.com 
> [10.100.0.247]); Fri, 24 Oct 2008 13:41:31 -0400 (EDT)
> Status: R
> 
> On Fri, 24 Oct 2008 10:04:50 -0400 (EDT)
> [EMAIL PROTECTED] wrote:
> 
> > I'm having severe DNS problems.  I'm running 6.2-RELEASE, and I upgraded
> > to the bind9 port (after cvsup) on July 14.  Starting yesterday morning,
> > DNS became very, very slow.  If I repeated a "dig" command three or four
> > times, I could get an answer after 20-30 seconds.  This morning I cvsupped
> > again and installed the bind95 port.  Still very, very slow.  I will
> > probably shift my server to a FreeBSD 7.0 system this weekend, but I
> > would like very much to understand what's going on.
> 
> Could this be a downstream server timing out?
> 
>   http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: libusb for linux-emulation

2008-10-24 Thread Daniel O'Connor
On Saturday 25 October 2008 05:57:36 Hans Petter Selasky wrote:
> Why can't you use and install:
>
> /usr/ports/devel/libusb
>
> ?

Because that gives you a FreeBSD libusb and he needs to have a Linux program 
talk to a USB device.

I'd like this too but it's beyond by ken :(
(It would be handy for Xilinx Webpack FPGA programming tools)

-- 
Daniel O'Connor software and network engineer
for Genesis Software - http://www.gsoft.com.au
"The nice thing about standards is that there
are so many of them to choose from."
  -- Andrew Tanenbaum
GPG Fingerprint - 5596 B766 97C0 0E94 4347 295E E593 DC20 7B3F CE8C


signature.asc
Description: This is a digitally signed message part.


Re: Why does adding /usr/lib32 to LD_LIBRARY_PATH break 64-bit binaries?

2008-10-24 Thread Daniel O'Connor
On Friday 24 October 2008 23:20:59 Peter Jeremy wrote:
> >this will make system trying to bind 32-bit libs to 64-bit program. it
> >can't work
>
> rtld shouldn't attempt to bind 32-bit libs to 64-bit programs.

The same problem happens with the Linux run time linker - it merrily tries to 
link FreeBSD libraries to Linux binaries with predictable results..

One trick I use for that is to put a symlink in /compat/linux in the place the 
problematic FreeBSD library is..

That said it would be really nice if it ignored incompatible libraries :)

-- 
Daniel O'Connor software and network engineer
for Genesis Software - http://www.gsoft.com.au
"The nice thing about standards is that there
are so many of them to choose from."
  -- Andrew Tanenbaum
GPG Fingerprint - 5596 B766 97C0 0E94 4347 295E E593 DC20 7B3F CE8C


signature.asc
Description: This is a digitally signed message part.