Spark and Mesos cluster optimization was discussed. The key points were: 1. Spark concepts like stages, tasks, and partitions were explained to understand application behavior and optimization opportunities around shuffling. 2. Application optimization focused on reducing shuffling through techniques like partitioning, reducing object sizes, and optimizing closures. 3. Memory tuning in Spark involved configuring storage and shuffling fractions to control memory usage between user data and Spark's internal data. 4. When running Spark on Mesos, coarse-grained and fine-grained allocation modes were described along with solutions like using Mesos roles to control resource allocation and dynamic allocation in coarse-grained mode.