I'm using a Raspberry Pi B+ with a camera, and it is purpose is literally just for use with the Motion software & share any images/videos it creates on a shared folder over Samba.
Ever since I formatted and set my Pi up (2-3 days ago) it has been taking a really long time to open a shared folder on the Pi from a my main Ubuntu machine on a very good network using Samba, so I started to look for problems on the Pi.
Upon issuing ~ $top on the CLI, i noticed that the Motion software averages about 50% of the CPU, and 10% of the memory. However, it regularly spikes to 98%, as shown below (I'm guessing this is when it is creating the .avi file using the stream of images it took when it noticed movement/motion). I'd like to understand if this is normal? Let's say the Pi is doing it's average 50-55% CPU utilisation with Motion, and then I open a shared folder on the Pi from my Ubuntu machine. Samba takes the remaining 50% of CPU & about 1 minute to open the folder (it does massively drop in CPU once the files are listed, but spikes again if I double click to open one of the files). I've just checked and the folder is 2.2GB large with loads of images and videos (but I've got my file browser - Nautilus - showing only a list file view). Is it normal for these programs to use so much CPU, if so, how can I speed it up?