System Administration
cancel
Showing results for 
Search instead for 
Did you mean: 

Test write performance found error

SOLVED
Go to solution
study unix
Regular Advisor

Test write performance found error

Hi All
I want to test disk write performance as below, the result is found error, and to check /dev/vg00/lvol6 becomes full, why it happened? If I want to test write and read performance, what command will it be performed? Thanks in advance!

that is "time dd if=/dev/zero of=/tmp/sysinfo.tgz " should not be used in disk write performance ?



root@test:/tmp # time dd if=/dev/zero of=/tmp/sysinfo.tgz

msgcnt 2 vxfs: mesg 001: vx_nospace - /dev/vg00/lvol6 file system full (1 block extent)
I/O error
5802049+0 records in
5802048+1 records out

real 3:19.7
user 2:28.4
sys 45.4

# bdf
Filesystem kbytes used avail %used Mounted on
/dev/vg00/lvol3 4194304 490408 3675048 12% /
/dev/vg00/lvol1 1014648 160680 752496 18% /stand
/dev/vg00/lvol8 8388608 4898488 3490120 58% /var
/dev/vg00/lvol7 20971520 2597736 18230280 12% /usr
/dev/vg00/lvol6 16777216 16777216 0 100% /tmp
/dev/vg00/lvtmp01 1638400 1502 1534599 0% /tmp/prd001
/dev/vg00/lvol5 8388608 3608408 4742888 43% /opt
/dev/vg00/lvol4 2097152 26648 2054368 1% /home
17 REPLIES
Dennis Handly
Acclaimed Contributor

Re: Test write performance found error

>time dd if=/dev/zero of=/tmp/sysinfo.tgz
>msgcnt 2 vxfs: mesg 001: vx_nospace - /dev/vg00/lvol6 file system full (1 block extent)

This will write until the FS is full. You need to limit the count:
count=n

You could also pick bigger block sizes:
bs=1024k
Jose Mosquera
Honored Contributor

Re: Test write performance found error

Hi,

I sugest that uses for your output file (of) a target that have enough free space to place the input file (if) inside, or uses a infinite device as /dev/null. Seems that you are mixed up the "if" and "of" entries order, so just try:
root@test:/tmp # time dd if=/tmp/sysinfo.tgz of=/dev/null

The "sar" command will be useful to trace disk performance (man sar).
#sar -d 5 100

Rgds.
Alzhy
Honored Contributor

Re: Test write performance found error

Why are you trying to test performance of your /tmp filesystem? Do yo have an application that uses /tmp as some sort of temp/hi-speed sort/transit area?

If you want to "test" how fast a filesystem can perform writes - then you need to TELL your tool how much to write to avoid filling up the filesystem. You also need to specify a "block size" since there are certain block sizes that are apropo for certain filesystems.

dd if=/dev/zero of=/path/file.dat bs=1024k count=1024

(will perform a write at 1MB block sizes for a total of 1GB, 1024 blocks). Note that repeating the test will likely give you a very fast performance due to Filesystem caching...

You can also use the peralloc command:

prealloc /tmp/test.dat 1000000000

will create a file size 1 billion bytes.

Note it will also be affected by cache so subsequent execution will yield very fast results.


Now a word on /tmp (or even /var/tmp) as applications temp space:

If /tmp or /var/tmp are part of your OS disk and yor OS disk is a local SCSI or RAIDED scsi disk -- that your app performance will be severely affected specially IF I/O requirements are steep... Invest on:

- having your OS be on SAN disks
- have your APPs TMPDIR or whatever environmental variable point to a SAN Disk filesystem
- Use SolidState SSD Disk for your OS or /tmp space.


Hakuna Matata.
study unix
Regular Advisor

Re: Test write performance found error

Hi All,
Very very thanks for all response, I see it now, but who can introduce these special file and its usage as below, thanks!
/dev/zero
/dev/null
/dev/full
/dev/random
study unix
Regular Advisor

Re: Test write performance found error

Hi All,
I suppose /dev/dsk/c0t0d0 is root disk,
if it run below command, this disk will be damaged ?
dd if=/dev/zero of=/dev/dsk/c0t0d0 bs=8k count=8192


Bill Hassell
Honored Contributor
Solution

Re: Test write performance found error


> I suppose /dev/dsk/c0t0d0 is root disk,
if it run below command, this disk will be damaged ?
> dd if=/dev/zero of=/dev/dsk/c0t0d0 bs=8k count=8192

The disk will not be damaged, BUT YOU WILL DESTROY ALL DATA ON YOUR ROOT DISK!!! Your system will no longer boot up and you will have to cold install everything on the root disk.

> introduce these special file and its usage as below, thanks!

> /dev/zero

/dev/zero provides an unlimited string of zeros.

> /dev/null

Often called the bit-bucket, this device file provides a destination for unlimited amounts of data -- the data is discarded. When used as input, it provides nothing but and end-of-data signal, that is, no data at all.

> /dev/full

Reading from this device will always succeed and report that the requested number of bytes were read. However, no data will actually be copied to the read buffer.

> /dev/random

This provides a random integer. It is not suitable for unlimited strings of random numbers as it will block when the string is long. Use /dev/urandom for longer strings.


Bill Hassell, sysadmin
study unix
Regular Advisor

Re: Test write performance found error

Hi Bill,
Thanks for your response,
as your points,if it runs below command, /tmp/sysinfo.tgz file will lose part of data, right ?
if yes, how to ensure the data integrity through command "dd if=/dev/zero of=/dev/rdsk/cxtxdx" for disk write performance?

root@test:/tmp # time dd if=/dev/zero of=/tmp/sysinfo.tgz count=1000
Torsten.
Acclaimed Contributor

Re: Test write performance found error

>> f yes, how to ensure the data integrity through command "dd if=/dev/zero of=/dev/rdsk/cxtxdx" for disk write performance?




Please try to understand that this will overwrite the complete disk, so you loose all the data!

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
study unix
Regular Advisor

Re: Test write performance found error

Hi Torsten,
Okay, I see it will overwrite the complete disk for dd if=/dev/zero of=/dev/rdsk/cxtxdx, my exact question should be,if it runs command "dd if=/dev/zero of=/tmp/sysinfo.tgz count=1000 bs=512kb", /tmp/sysinfo.tgz file will be overwrite part of original data, right ? Base on the premise that /tmp leave more than 500 MB space!
Torsten.
Acclaimed Contributor

Re: Test write performance found error

This command will write to a file, so nothing will be overwritten.

You will get an error, if the file system is full before the command has finished.

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
Dennis Handly
Acclaimed Contributor

Re: Test write performance found error

>if it runs command "dd ... count=1000 bs=512kb", /tmp/sysinfo.tgz file will be overwrite part of original data, right?

All of 512 Mb of /tmp/sysinfo.tgz will be overwritten.
Dennis Handly
Acclaimed Contributor

Re: Test write performance found error

>ME: All of 512 Mb

Oops, I rounded it up too much, 500 Mb as you said.
study unix
Regular Advisor

Re: Test write performance found error

Hi Torsten, Dennis,
Thanks for your help,
Torsten ---This command will write to a file, so nothing will be overwritten.
Dennis---All of 512 Mb of /tmp/sysinfo.tgz will be overwritten.
original data will be overwrite or not ?
Dennis Handly
Acclaimed Contributor

Re: Test write performance found error

>original data will be overwrite or not?

Yes, provided it was <= 500 Mb.
Torsten.
Acclaimed Contributor

Re: Test write performance found error

The file /tmp/sysinfo.tgz will be overwritten.



But why you want to write to this file???

Write to another file!

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
study unix
Regular Advisor

Re: Test write performance found error

Hi Dennis and Torsten,
Thanks for all help, as your points,
If I test one disk write performance, it should run command "dd if=/dev/zero of=/dev/rdsk/cxdxtx count=xxx bs=xxx, but if original data exists in /dev/rdsk/cxtxdx, it will lose part of data due to be overwrite, right? that is what other ways to test disk write performance?
Torsten.
Acclaimed Contributor

Re: Test write performance found error

Consider to sarch the hp-ux forum for related threads - you'll get a lot of good hits.

http://forums.itrc.hp.com/service/james/home.do?from=forums

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!