This article is published in the April 2024 issue.

Optimizing Code Performance in Serverless Environments


By Yasra Chandio (CRA-E Fellow, University of Massachusetts Amherst) and Alejandro Velasco Dimate (CRA-E Fellow, College of William & Mary)

Shreyas Kharbanda, B.S. in Computer Science, Purdue University

This Q&A highlight features Shreyas Kharbanda, an Honorable Mention in the 2023 CRA Outstanding Undergraduate Researchers award program. Shreyas finished his undergraduate degree at Purdue University and is now pursuing his Ph.D. in Computer Science at Cornell University. 

What brought you to computing research?

Following the recommendations of my undergraduate academic advisor, I reached out to Professor Pedro Fonseca, who was kind enough to discuss my research interests with me. He gave me the opportunity to collaborate on an ongoing project in his lab, aiming to explore the intersection of operating systems, programming languages, and distributed systems. Dr. Fonseca’s mentorship was instrumental for me to jump into the beginning of my research journey, which I pursued throughout my junior and senior years at Purdue. I was drawn to research because of my interest in computer systems and the opportunity to collaborate with amazing people to solve intellectually challenging problems.

What challenges did you encounter when you started research? 

When I began my research, I was often overwhelmed by all I did not know. But, it was amazing when I started looking at how much I was learning week after week. I quickly shifted my focus from what I did not know to the progress I was making.

How was your experience working in a research environment?

The collaborative environment in Dr. Fonseca’s research group was very inspiring. I was fortunate to work with Sumer Kohli (Graduate Student at Stanford), Joao Carreira (Former Graduate Student at UC Berkeley), and Prof. Rodrigo Bruno (Faculty at the University of Lisbon). All the researchers with whom I had the opportunity to interact were encouraging and supportive. This sparked my curiosity to explore new boundaries in system research and expanded the horizons of what I considered possible for my career and research plans. 

Can you tell us about your project?

My research aimed to enhance the reliability and performance of cloud-based systems. Modern language runtimes enhance code performance by gathering execution profiles during runtime. These execution profiles are data collections that detail how programs behave during their execution. However, in serverless environments, where program instances can be scaled or terminated, cloud providers can evict execution profiles due to inactivity, erasing the accumulated knowledge. When restarted, redundant computations are executed as they gather these profiles, missing opportunities to improve the performance of applications across different instances. Researchers have been working on ways to alleviate this problem by using snapshots created after a program starts and have done a few tasks, deciding the best moment to take a snapshot while capturing most of the optimal operations in scenarios that depend on run-time compilations is still a big question that researchers are trying to answer. To solve this issue, we started from the basics. We systematically dug into the lower level of serverless computations, such as checkpoint primitives, and investigated different mechanisms to capture snapshots along with their trade-offs. By doing so, we developed a system that uses a smart and adaptable strategy for quickly saving and loading program instances to make serverless functions run faster with optimized code as soon as they start executing. Our project culminated in an end-to-end system implementation, significantly improving the performance of serverless functions over the state-of-the-art. Our work will be published in EuroSys ‘24.

What aspects of research shaped your professional path? 

One of my favorite aspects of research was tackling intellectually challenging problems alongside exceptionally talented and kind individuals. Watching faculty members passionately contribute to science and mentor the next generation of researchers made me realize that I aspire to join this esteemed community and make a meaningful impact. My lab environment not only fostered deep learning skills but also facilitated my personal and professional growth. For instance, our combined hard work and efforts culminated in two major publications: one presented at SESAME’23 and another at EuroSys’24. Combined, all of these experiences have deeply influenced my career goals. 

How do you balance research with other interests? 

Balancing my research commitments with my hobbies has been a learning experience. I have discovered that skills such as problem-solving, patience, and creativity, which I develop through my hobbies, equally apply to my research. I dabble in wilderness backpacking and playing the guitar; these activities provide a much-needed break from academic work, helping me stay mentally refreshed and often inspiring new ideas.

Do you have any advice for other students looking to get into research?

The best advice I have received is to start researching and keep learning as you go. In the beginning, you might feel unsure and overwhelmed, but that is okay. You should embrace the uncertainty because it is a normal part of the journey. Don’t let it discourage you; instead, see it as a chance to grow and keep moving forward.