Apache Spark is generally not recommended as a Big Data tool when the hardware configuration of your Big Data cluster or device lacks physical memory (RAM). The Spark engine vastly relies on decent amounts of physical memory on the relevant nodes for in-memory processing.
Check out this Spark Tutorial to understand more