By Darryl Gove on Sep 04, 2007
I was recently collecting a profile from an app running on a machine in Europe, but writing the data back to a machine here in CA. The application normally ran in 5 minutes, so I was surprised that it had made no progress after 3 hours when run under collect.
The Analyzer experiment looked like:
Dir : archives 08/28/07 23:47:10 File: dyntext 08/28/07 23:47:12 File: log.xml 598 KB 08/29/07 03:02:52 File: map.xml 3 KB 08/28/07 23:47:22 File: overview 4060 KB 08/29/07 03:02:51 File: profile 256 KB 08/28/07 23:47:56
Two of the files (log.xml and overview) had accumulated data since the start of the application, the other files had not. truss output showed plenty of writes to these files:
0.0001 open("/net/remotefs/.../test.1.er/log.xml", O_WRONLY|O_APPEND) = 4 0.0000 write(4, " < e v e n t k i n d =".., 74) = 74 0.0004 close(4) = 0
In fact it looked rather like opening and closing these remote files were taking all the time away from running the application. One of the Analyzer team suggested passing -S off to collect to switch off periodic sampling. Periodic sampling is collecting application state at one second intervals. Using this flag, the application terminated in the usual 5 minutes and produced a valid profile.