Aim of this thesis is to investigate whether performing secondary storage memory optimization in an embedded system by improving on-disk patterns generated by input/output (I/O) operations, while system is still operational or online, can increase performance and life time. Complex workloads on embedded devices result in non optimal I/O patterns, and these patterns then increase power consumption in addition to reducing read/write throughput for future requests. Because of limited resources and nature of use case, in certain situations it is impossible to take system or storage device offline and run optimizations for prolonged period of time. This work achieves its goal by designing a daemon which monitors I/O operations on storage device inside operating system and then based on certain pre-defined criteria, moves data into contiguous spaces and aligns them based on storage device characteristics when system is idle. After implementing daemon, file system benchmarking is used to evaluate it based on file system performance.