Archive

Uncategorized

A substantial part of the people I encounter present using OSX on a Macbook. I am not sure how much of these people use Apple’s Keynote for presenting, but I like Keynote very much for various reasons, like a cleaner interface. This blogpost is about some handy tips and tricks I learned using a few years of presenting around the world. If you don’t use OSX, this blogpost is probably not for you.

1. Setup a private network with your iPhone/clicker
This first step has two important reasons. The first reason is extremely obvious: in order to communicate with your iPhone/clicker, you need a connection. The second reason is a little less obvious: if the conference you are attending as a speaker as wireless access, you probably joined that wireless network. In order to make your computer NOT respond to any kind of signal from the internet (growl, notification center, updates, etc.), you really should disconnect first. When you setup a private network with your iPhone/clicker, you are not connected to the internet anymore. (obviously you need to disconnect any wired internet connections too!)

This is done on the Macbook using the wifi signal strength indicator on the upper right side, create network. Choose 40-bit WEP (this isn’t the safest encryption on the world, but you are going to use this for relatively short time), and choose a 5 character password.

Next go to the Settings on your iPhone, choose ‘Wi-Fi’, and select the network you just setup on your Macbook. The default name of the local network is the name of the computer. If it’s the first time, or you’ve changed the password, enter the 5 character password you choose when setting up the local network.

What is lesser know, is that you now DO NOT HAVE A CONNECTION AT THIS MOMENT. Simple reason is there is no DHCP server which gives both your Macbook and your iPhone an ip address. You need to wait a little while, then both your Macbook and your iPhone will self assign an ip address. On your Macbook, go to System Prefences>Network, and click on “Wi-Fi”. It has an orange colour, not a green colour as you might expect. If you have clicked on “Wi-Fi”, the description will say something like:

Wi-Fi has the self-assigned IP address 169.254.111.111 and will not be able to connect to the Internet.

Your IP address will be different. Now go to your iPhone, and go to Settings>Wi-Fi, and look what network is selected. It should be the network with the name of your Macbook. If your iPhone powersaved, it will probably gone to the wireless of the conference again, more on that later. (Re)select the network with the name of your Macbook, and click on the blue circle with the bigger-than sign in it on the right side if the network. It shows you an IP address and the subnet mask. If you just re-set the Macbook network, you probably must wait a little while before it assigns an IP address to itself.

In order to perform a test if a connection is possible, open a terminal on your Macbook, and ping the (self assigned) IP address of the iPhone. If the network connection can be used, ping will show response from the iPhone.

2. Disable powersave on your Macbook
You do not want your Macbook to go into powersave while your are setting it up, talking to people, when presenting, or when you go out of the presentation to show something and you are discussing that. There is an extremely simple way to do that: caffeine. Search for this little piece of software on the internet, or, even simpler: go to the OSX app store, and search for caffeine. It’s a free application. If you fire it up, it shows an empty cup in the top bar on the right side. When you do not want your computer to go into powersave at any time, click on the cup: it will show a full cup of coffee. That’s simple, right?

3. Disable powersave on your iPhone
Probably you have set your iPhone up to powersave too. This is done in Settings>General>Auto-lock; set it to ‘Never’. As you probably know or learned, once your iPhone goes into powersave, it turns off wireless. So if you enable your iPhone, wireless will turn on again, and just search for any network it can autoconnect to. This is the reason it will connect to the conference wireless again: the local network is not saved by default, but the conference wireless is.

4. Use your iPhone as a clicker
There are two ways that I’ve used to use your iPhone as a clicker, the ‘Remotepad’ app (which needs an application on OSX too called the same, and makes a mouse of your iPhone), or the Keynote Remote app. If you are serious about presenting, and want to use your iPhone as a remote, my opinion is to buy the Keynote Remote app. The strong point is its simplicity: swipe right to left for going forward (‘click’) or swipe left to right to go backward. The other two functions it’s got is go to beginning and go to end. That’s all.

If you didn’t had the Keynote Remote app, and installed it on your iPhone, and you’ve setup the network, there’s one additional thing you should do: link keynote with the app. Startup or select Keynote, Select Keynote>Preferences and go to the ‘Remote’ tab/icon. Now select ‘Enable iPhone and iPod touch remotes’, and link the two together.

Keynote has to be started on your Macbook, and the presentation you want to use needs to be loaded, but does not have to be set in presenting mode already; if you start the Keynote Remote app on your iPhone, it will put Keynote in presentation mode with the current slide.

Happy presenting!

In my previous post about perf I showed how it can be used to determine the function which is used the most systemwide.

One thing it helped me with, is determining the impact of swapping on a system. The testcase I build for that is kind of a no-brainer (setting up a 3GB SGA with 2GB of physical memory in a test VM), but think about a few things: I regularly encounter systems who have an amount of swap allocated. This can mean memory is simply plain over allocated, but can also be older pages are just swapped out by Linux “just in case”. This probably will happen more with the new oracle recommendation for “swappiness” (the eagerness of Linux to swap) to set it to 100 (used to be 60). The amount of swap transfers can be measured, but the regular tools cannot measure the impact. With perf, this is possible.

I ran another SLOB run (10 readers) against the 3GB SGA/2GB physical memory system, and collected perf data with ‘perf record -e cpu-clock -g -a’. After the run, I printed a summary of the collected data using ‘perf report -g none’:

# Events: 33K cpu-clock
#
# Overhead          Command                       Shared Object                                                                                                                     
# ........  ...............  ..................................  
#
    24.65%          swapper  [kernel.kallsyms]                   [k] native_safe_halt
    17.99%           oracle  [kernel.kallsyms]                   [k] _raw_spin_unlock_irqrestore
    10.82%           oracle  oracle                              [.] kcbgtcr
     2.94%           oracle  oracle                              [.] qetlbr
     2.66%           oracle  oracle                              [.] kcbz_fp_buf
     2.22%           oracle  oracle                              [.] kdsgrp
     1.98%           oracle  oracle                              [.] kafger

I guess this speaks for itself. The highest number of measurements of a function (24.65%) was a kernel-mode function ([k]) ‘native_safe_halt’, which was issued by ‘swapper’. The next most active function (17.99%) was a kernel-mode function ([k]) ‘_raw_spin_unlock_irqrestore’ which was issued by oracle. This function represent waiting for I/O (read on if you want to be able to determine that). Next functions are user land functions ([.]). These are issued by oracle, with the executable oracle. Because we are using SLOB, which is made to issue 8KB block reads, it makes sense the user land function with the most impact is the ‘kcbgtcr’ function (kernel cache buffer get consistent read).

Above example shows the summary of the perf recording. The “normal” report shows the complete stack from the active function down to main. Here is an example with the data from which the summary above has been made:

# Events: 33K cpu-clock
#
# Overhead          Command                       Shared Object                                                                                                                     
# ........  ...............  ..................................  ...................................................................................................................
#
    24.65%          swapper  [kernel.kallsyms]                   [k] native_safe_halt
                    |
                    --- native_safe_halt
                        cpu_idle
                        rest_init
                        start_kernel
                        x86_64_start_reservations
                        x86_64_start_kernel

    17.99%           oracle  [kernel.kallsyms]                   [k] _raw_spin_unlock_irqrestore
                    |
                    --- _raw_spin_unlock_irqrestore
                       |          
                       |--97.51%-- scsi_dispatch_cmd
                       |          scsi_request_fn
                       |          __blk_run_queue
                       |          |          
                       |          |--99.69%-- queue_unplugged
                       |          |          blk_flush_plug_list
                       |          |          |          
                       |          |          |--94.22%-- blk_finish_plug
                       |          |          |          |          
                       |          |          |          |--99.85%-- generic_file_read_iter
                       |          |          |          |          generic_file_aio_read
                       |          |          |          |          aio_rw_vect_retry
                       |          |          |          |          aio_run_iocb
                       |          |          |          |          io_submit_one
                       |          |          |          |          do_io_submit
                       |          |          |          |          sys_io_submit
                       |          |          |          |          system_call_fastpath
                       |          |          |          |          io_submit
                       |          |          |          |          |          
                       |          |          |          |           --100.00%-- skgfqio
                       |          |          |          |                     ksfd_skgfqio

Here you see the stack of the swapper, and the different stacks, as a tree, which lead to _raw_spin_unlock_irqrestore, with percentages of functions from the differences which lead the same executable/function combination.

Using the percentages, the function calls can be investigated which happen on the system. Above sample shows the last two oracle database functions prior to the io_submit call (io_submit is the function to issue an asynchronous IO call), ksfd_skgfqio and skgfqio. Next we see the io_submit call, and everything which is called by the kernel.

The report contains all the stacks, not a partial one like my example.

I’ve entered two abstracts into the suggest a session database track on oracle mix. If you want to see these sessions at Oracle Openworld this year, please vote on these:
Oracle 11gR2 clusterware in depth
Does the Sun Oracle database machine meet expectations in real life?

These sessions are technical, and try to paint a picture about how it’s working. I am looking forward meeting you in San Francisco!

At the 31st of march 2010 I attended Julian Dyke’s ‘Oracle 11gR2 for RAC users’ seminar.

The seminar was held in Utrecht (a city in the Netherlands) at the La Place meetingcentre in ‘Hoog Catharijne’. The meeting centre has good coffee.

Julian described the differences between currently used RAC versions (mostly 10.2) and the newer 11 versions, together with an impressive amount of experience from a broad range of customers. Also some specific 11.2 database features where touched.

The seminar was enjoyable, especially the experience in specific situations.

Thank you Julian, and Anjo and Annette of http://www.miraclebenelux.nl!

Follow

Get every new post delivered to your Inbox.

Join 1,047 other followers

%d bloggers like this: