Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It only takes a minute to sign up.
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
I was heavy tasking a while ago which probably lead to swap being used, probably the first time. But now there is still data in swap even though ram is free.
Fear not. This is expected behavior.
The kernel does not blindly copy back and forth between RAM and Swap. It's a bit more clever than that. Rarely-used data may remain in swap for quite a while.