How Would You Like Your Loops Served Today?


 
Thread Tools Search this Thread
The Lounge What is on Your Mind? How Would You Like Your Loops Served Today?
# 8  
Old 06-14-2012
I do not have an opinion, except that the scrutinizer's test is somewhat flawed, IMO:

#1. The speed difference is because of disk controller caching. Try reversing the order the commands are executed.

Or making two identical copies of the file for the test.

#2. ksh93 mmaps files in that syntactic context, and usually means a single full-on 66 MB I/O request which modern controllers can perform on one request. 66MB may well fit in disk controller cache. So that is a valid result - faster.

Also you need to remove the character special I/O:
my take using one of our compellant SAN:
Code:
# uzpplpl_ng02cprd.log.73 is 160MB 

appworx> time cat uzpplpl_ng02cprd.log.73 > /dev/null

real    0m0.02s
user    0m0.00s
sys     0m0.01s

That measures the overhead required do to a single cat. Zilch, IMO. You have to come up with a way to show me that creating one extra child is important to something like this as well.

OTH creating thousands of children for a cat call inside a loop is a very serious issue, which I think is the origin of the entire UUOC thing.
# 9  
Old 06-14-2012
I did execute all tests various times in different order, on two different platforms it produced no significant difference (per platform). There was a dramatic difference with the repeated plain cat to /dev/null test due to caching which I had also performed of course in prior to these tests (to check its effect), but this thread was not about that. It was about two different methods of feeding into a while read loop, which is what I tested and these results are reproducible.

Last edited by Scrutinizer; 06-14-2012 at 06:02 PM..
Login or Register to Ask a Question

Previous Thread | Next Thread

4 More Discussions You Might Find Interesting

1. AIX

VIOS backupios -mksysb - does it need to be served by a NIM server ?

working through VIOS backup options. Generally, we store mksysb's on a server and then NFS mount them from it to copy to a VIO optical library, etc. In the case of a VIO backup, I see the -mksysb option to backupios and understand that it doesn't include the NIM resources in the backup. ... (3 Replies)
Discussion started by: maraixadm
3 Replies

2. Shell Programming and Scripting

meaning of today=${1:-${today}}

what does today=${1:-${today}} mean??? I saw a script which has these two lines: today=`date '+%y%m%d'` today=${1:-${today}} but both gives the same value for $today user:/export/home/user>today=`date '+%y%m%d'` user:/export/home/user>echo $today 120326... (2 Replies)
Discussion started by: Vidhyaprakash
2 Replies

3. Web Development

Symbol Links amongst Apache's served files, is this a security-don't?

I read somewhere that you should make sure Apache is configured to not allow symbolic links to be followed outside the webroot, as this can compromise security. I can imagine how this could lead to a security risk: eg: Is my assumption correct? -- Is it nothing more than: "its just... (0 Replies)
Discussion started by: jzacsh
0 Replies

4. IP Networking

to serve or be served??

I have two machines on my network - one OSX mac and one linux box. The mac is my main workhorse, and the linux box does occasional chores and webserving. Currently the mac shares (via NFS) files with the Liinux box. Would it be less demanding on the mac if I made it a client, and moved my files... (2 Replies)
Discussion started by: mistafeesh
2 Replies
Login or Register to Ask a Question