Increasing GELI performance

2007-07-28 Thread Dominic Bishop
 sent this to geom@ and meant to CC here as that seems to be a pretty quiet
list so might not get seen there, I forgot the CC so apologies for sending
separately here. I'll add here a few extra bits sent to geom@ to a response:

Trying newfs with -S option to specify sector size matching -s option to
geli init:

newfs -S 65536 /dev/da0p1.eli
increasing block size from 16384 to fragment size (65536)
/dev/da0p1.eli: 62499.9MB (127999872 sectors) block size 65536, fragment
size 65536
using 5 cylinder groups of 14514.56MB, 232233 blks, 58112 inodes.
newfs: can't read old UFS1 superblock: read error from block device: Invalid
argument

Diskinfo reports correct sector size for geli layer and 512 byte for
underlying GPT partition:
diskinfo -v /dev/da0p1
/dev/da0p1
512 # sectorsize
6553600 # mediasize in bytes (61G)
12800   # mediasize in sectors
7967# Cylinders according to firmware.
255 # Heads according to firmware.
63  # Sectors according to firmware.

diskinfo -v /dev/da0p1.eli
/dev/da0p1.eli
65536   # sectorsize
65535934464 # mediasize in bytes (61G)
99  # mediasize in sectors
62  # Cylinders according to firmware.
255 # Heads according to firmware.
63  # Sectors according to firmware.

Testing on a onetime geli encryption of the underlying raw device to bypass
the GPT shows very similar poor results:

dd if=/dev/da0.eli of=/dev/null bs=1m count=1000
1000+0 records in
1000+0 records out
1048576000 bytes transferred in 29.739186 secs (35259069 bytes/sec)

dd if=/dev/zero of=/dev/da0.eli bs=1m count=1000
1000+0 records in
1000+0 records out
1048576000 bytes transferred in 23.501061 secs (44618241 bytes/sec)

For comparison the same test done on the unencrypted raw device:

dd if=/dev/da0 of=/dev/null bs=1m count=1000
1000+0 records in
1000+0 records out
1048576000 bytes transferred in 5.802704 secs (180704717 bytes/sec)

dd if=/dev/zero of=/dev/da0 bs=1m count=1000
1000+0 records in
1000+0 records out
1048576000 bytes transferred in 4.026869 secs (260394859 bytes/sec)


Looking at 'top -S -s1' whilst doing a long read/write using geli shows a
geli thread for each core but there only ever seems to be one in a running
state at any given time, the others will be in a state of 'geli:w'. This
would suggest why performance is identical with only 1 geli thread and with
4 geli threads.

Regards,

Dominic Bishop

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


Booting from a large RAID

2007-06-25 Thread Dominic Bishop
I am looking to deploy some new fileservers shortly running on either
RELENG_6_2 or RELENG_6, these servers will have 16x500GB SATA drives running
on a 3ware 9650 raid controller.

Ideally I would like this to be configured as a single large RAID5 or RAID6
array, however this leaves me problems with installing the OS. I can't use
bsdlabel on a drive of this size as it has a 2TB limit, and as I understand
it I can't use GPT and put the OS on there since the bootloader code isn't
capable of booting from a GPT partition.

At this point I'm assuming my only option is a separate small HD for the OS
which can be partitioned using bsdlabel. Ideally I would rather not do this
however as the server cases only have 16 drive bays so I'll have to
sacrifice some capacity from the RAID in order to achieve this.

Just want to make sure I am correctly understanding the limitations around
what I want to do. Any comments/corrections to my line of thinking are
welcome.

Regards,

Dominic Bishop

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


Help needed modifying shutdown scripts

2004-02-23 Thread Dominic Bishop
I am trying to use some custom startup+shutdown scripts to control a Belkin
UPS using the nut utility. Essentially to achieve what is shown in point 4
of

http://quasar.mathstat.uottawa.ca/~selinger/ups/belkin-universal-ups.html

Before continuing, here is the output of uname -a:

FreeBSD magellan.dom.bishnet.net 5.2.1-RC2 FreeBSD 5.2.1-RC2 #1: Sun Feb 22
02:52:35 GMT 2004
[EMAIL PROTECTED]:/u2/usr/obj/u2/usr/src/sys/MAGELLAN  
i386


The startup section is working fine, I created my own script in /etc/rc.d
and
it runs at the correct time.

The shutdown bit however is causing me problems, I inserted my code into
rc.shutdown under the section headed # Insert other shutdown procedures
here

Since FreeBSD doesn't seem to remount disks read-only during this script I
first unmounted all unnecessary partitions and then made sure /, /usr, /var
were all mounted read-only, as these are needed for the UPS driver to run.

The UPS driver runs as expected and sits there monitoring battery power,
however I get a fair few processes exiting on signal 11 which is worrying
and then more worrying is that it kills the driver, and completes halting
the
system. Once in this state the system will never come back when AC power
returns which is of course not desirable.

Here is console output from around the point of the driver starting onwards:
(Currently the script calls mount with no arguments so I could check that
the mounts were as I expected, hence the mountpoint entries)


pid 478 (mountd), uid 0: exited on signal 11
/dev/ar0s1a on / (ufs, local, read-only)
devfs on /dev (devfs, local)
procfs on /proc (procfs, local)
/dev/ar0s1f on /usr (ufs, local, read-only)
/dev/ar0s1d on /var (ufs, local, read-only)
Waiting for AC power, or for UPS batteries to run out...
Network UPS Tools - Belkin 'Universal UPS' driver 0.06 (1.5.13)

Connecting to UPS...
pid 542 (ntpd), uid 0: exited on signal 11
UPS is on battery, battery level: 20%
pid 511 (usbd), uid 0: exited on signal 11
pid 801 (logger), uid 0: exited on signal 11
UPS is on battery, battery level: 17%
pid 394 (rpcbind), uid 0: exited on signal 11
UPS is on battery, battery level: 15%
pid 806 (identd), uid 0: exited on signal 11
UPS is on battery, battery level: 12%
pid 769 (moused), uid 0: exited on signal 11
pid 563 (sshd), uid 0: exited on signal 11
pid 499 (rpc.lockd), uid 1: exited on signal 11
pid 385 (named), uid 53: exited on signal 11
FWaiting (max 60 seconds) for system process `vnlru' to stop...stopped
Waiting (max 60 seconds) for system process `bufdaemon' to stop...stopped
Waiting (max 60 seconds) for system process `syncer' to stop...stopped

syncing disks, buffers remaining... 
done
Uptime: 6m27s
GEOM: destroy disk twed0 dp=0xc616200c
twed0: detached
Shutting down ACPI

The operating system has halted.

Most importantly can anyone tell me how to stop the system being shutdown
before rc.shutdown terminates? (the UPS driver stays in foreground until the
battery runs out, unless AC power returns in which case it calls reboot)

I'm guessing that all the sig 11s are due to filesystems being mounted read
only, but what I don't understand is why these processes are even still
running?

All of these processes are controlled by rc.d and looking at rc.shutdown
they
should have been stopped before the section I've placed my code is reached.
ie in the section:
# Determine the shutdown order of the /etc/rc.d scripts,
# and perform the operation

This got me curious so I created a simple test script which was a copy of
the
original rc.shutdown with the watchdog timer bits removed and the running of
rc.d script shutdown set to simply echo the command instead, when run it
output
this:

run_rc_script /etc/rc.d/exim stop
run_rc_script /etc/rc.d/inetd stop
run_rc_script /etc/rc.d/localpkg stop
run_rc_script /etc/rc.d/jail stop
run_rc_script /etc/rc.d/cron stop
run_rc_script /etc/rc.d/local stop
run_rc_script /etc/rc.d/nfsclient stop
run_rc_script /etc/rc.d/ipfs stop
run_rc_script /etc/rc.d/random stop
run_rc_script /etc/rc.d/swap1 stop
.

This seems to be a rather small subset of the scripts in rc.d that are run
on
startup, and notably excludes commands to stop all the processes I was
getting
sig 11s from. Am I missing something here?

So in summary, the most important thing I wish to fix is to stop the OS from
halting whilst the UPS driver is still running as at the moment it leaves me
with the possibility of the system not resuming unattended.

The less important aspect is stopping the sig 11s from those processes as it
would be nice not to get a whole bunch of .core files in my / ;-)
However I can live with them if I have to.

Any suggestions?

Regards,

Dominic Bishop

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


RE: Help needed modifying shutdown scripts

2004-02-23 Thread Dominic Bishop
 of the problem.

It seems init places a limit on the time rc.shutdown can take
of 2 minutes, this however can be overriden by the use of
kern.shutdown_timeout sysctl, so by setting this to a
sufficiently large value I should be able to solve half my
problem (not had a chance to test yet).

The problem with processes from rc.d not being killed and
thus dying on signal 11 still eludes me however so any help
on this part would be much appreciated.

Sorry for quoting my entire already long original post, but
since I intertwined the 2 issues in the original it was a bit
awkward to snip.

Regards,

Dominic Bishop

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


kern.shutdown_timeout sysctl

2004-02-23 Thread Dominic Bishop
I just tried setting the value of the kern.shutdown_timeout sysctl and it
failed with:

sysctl: unknown oid 'kern.shutdown_timeout'

I am trying to increase the maximum time allowed for rc.shutdown to run for
reasons explained in my previous post Help needed modifying shutdown
scripts

From the source code of init (ie init.c) it clearly reads the value of this
sysctl to override the default of 2 minutes:

if (sysctlbyname(kern.shutdown_timeout,
 shutdowntimeout,
 len, NULL, 0) == -1 || shutdowntimeout  2)
shutdowntimeout = DEATH_SCRIPT;

But it appears that in reality this sysctl value doesn't exist, I looked
through sysctl.h and couldn't see it in there either.

Can I assume this is a bug and one or the other bit is wrong?

And is there anyway to fix this?

If it comes to it I can just override the default 2 minutes by altering the
#define in init.c but I would prefer to not hack the source and have to
re-edit after every src cvsup, especially since the sysctl would provide a
much neater way of accomplishing it.

Regards,

Dominic Bishop

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


Custom startup+shutdown scripts

2004-02-20 Thread Dominic Bishop
I am shortly going to try and install a Belkin universal UPS on one of my
FreeBSD machines running 5.2 using the nut utility.

Due to a failing in the Belkin protocol it requires some custom
startup/shutdown scripting to make it work in an unsupervised recovery,

This is shown in point 4 of
http://eu1.networkupstools.org/protocols/belkin-universal/

The shutdown code needs to be run without disks mounted as read/write since
it effectively holds the machine until power comes on or the UPS batteries
die, in the latter case this would cause an unclean shutdown with the disks
fully mounted and system up.

The startup script needs to be run before disks are mounted in read/write
and before filesystem checks for similar reasons.

I've looked through some of the rc scripts, namely rc.shutdown and a few
others but really aren't sure as to where I should make these changes so
they execute at the correct time in the boot/shutdown process. Could anyone
tell me where I should be making these additions?

Regards,

Dominic Bishop

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


3ware 3dmd management tool

2003-03-29 Thread Dominic Bishop
I have just attempted to install the 3dmd tool for use with my 7500-8
controller under FreeBSD-5.0-RELEASE-p4. 

I have managed to get the tool running fine however I am unable to set a
password. From what documentation I found the default password is
3ware and comparing the .conf file with the FreeBSD version against
the latest linux build (since this has more documentation etc) the key
in the .conf file does match the linux one which has this default
password. When attempting to change the password I just get a message
saying Error: failed to set password with no explanation as to why.
Does anyone know how to fix this since I really don't want 3dmd running
without password protection.

For reference I am using 3dm-bsd-1.10.0.011.tar.gz with firmware version
7.5.3

Regards, 

Dominic Bishop

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