- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: disk wipe performance question.
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-05-2011 06:59 AM
тАО01-05-2011 06:59 AM
The line that writes the zeros is:
dd if=/dev/zero of=/dev/rdsk/$1 bs=1024k
The line trhat writes ones is:
tr '\000' '\377' < /dev/zero |dd bs=1024k of=/dev/rdsk/$1
When writing the zeros I'm getting 35MB/s and each disk write is about 256KB.
When writing the ones I'm getting 2MB/s and each disk write is about 8KB.
Can someone suggest a change to the line that writes the ones which could improve its performance?
Thank you
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-05-2011 07:26 AM
тАО01-05-2011 07:26 AM
Re: disk wipe performance question.
tr '\000' '\377' < /dev/zero | dd bs=10240k of=/tmp/onesfile count=1
i=0
while true
do
dd if=/tmp/onesfile of=/dev/rdsk/$1 bs=10240k count=1 seek=$i
if [[ $? != 0 ]]
then
break
fi
i=`expr $i + 1`
done
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-05-2011 07:39 AM
тАО01-05-2011 07:39 AM
Re: disk wipe performance question.
What happens to the timing if you use:
tr '\000' '\000' < /dev/zero | dd bs=1024k of=/dev/rdsk/$1
Note the use of a pipe will be slow. Why not write a program to do the writes with writev(2).
Or better yet use /dev/random.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-05-2011 07:41 AM
тАО01-05-2011 07:41 AM
Re: disk wipe performance question.
In that case I will not have a file to read from. Perhaps a memory based file could work.
I think the issue might be the small write sizes instead of the tr command. Running Glance shows the CPU utilization low but the disk at 100% with 240 IO/sec.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-05-2011 07:54 AM
тАО01-05-2011 07:54 AM
SolutionWhere do you think the shell and dd come from?
>I think the issue might be the small write sizes instead of the tr command.
That's why changing the tr(1) parms would indicate that.
Also tusc would show you the sizes of the writes.
>Running Glance shows the CPU utilization low but the disk at 100% with 240 IO/sec.
This seems strange. I would think dd(1) would still do those 1 Mb writes.
But perhaps you need to do reblocking:
tr ... | dd ibs=8k obs=1024k of=/dev/rdsk/$1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-05-2011 08:07 AM
тАО01-05-2011 08:07 AM
Re: disk wipe performance question.
Thanks. I will try the reblocking. As for where the dd and script comes from - The last time I ran this, it appeared that everything I needed got into memory and stayed there. Perhaps the same would happen to your ones file.
Even after the vg00 disk was completely wiped the system stayed up and I could still do some commands. Of course whenever I tied to access the disk I got a filesystem error and the system failed to reboot.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-05-2011 08:37 AM
тАО01-05-2011 08:37 AM
Re: disk wipe performance question.
You mean Joachim's. My write-a-C program would just use a large buffer and hopefully it would also stay in memory.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-05-2011 08:42 AM
тАО01-05-2011 08:42 AM
Re: disk wipe performance question.
Thank you very much.