Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve script efficiency #1

Open
jvimal opened this issue Nov 12, 2012 · 0 comments
Open

Improve script efficiency #1

jvimal opened this issue Nov 12, 2012 · 0 comments
Assignees

Comments

@jvimal
Copy link
Member

jvimal commented Nov 12, 2012

Currently, mininet tracing uses kernel ftrace in sysfs to log trace output, by using "cat" and reading ASCII from kernel space, and flushing it to disk periodically (whatever "cat" does). A full blown ASCII is perhaps the least efficient representation of a tracing event, which is often just a few integers and maybe a 32 character string (for container/task name).

The "perf" utility (in linux-git/tools/perf) is built to efficiently log these tracing events. E.g. workflow:

# insmod mntracer.ko
# cd /tmp
# perf record -a -e mininet:* sleep 1
[ perf record: Woken up 1 times to write data ]
[ perf record: Captured and wrote 0.128 MB perf.data (~5589 samples) ]
# perf script
... shows same output
@ghost ghost assigned jvimal Nov 12, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant