Service Sims are those (usually) called or pushed to your sim's home to perform their services. These include maids, butlers, mail/pizza delivery, babysitters, social workers, the repo sims, stray animals, the IP non-resident mermaids, grim reapers, time travelers. Service Sims are always homeless and usually have nothing to do with community lots. If you try to give them a proper home/household, they will lose their Service assignment immediately and the game will find or spawn a replacement for them in the Service Pool.
Role Sims are different and are those who staff objects on community lots like cash registers, bars, bouncer ropes, tattoo chairs, festival lot booths. There are a couple of special global cases with no objects like the paparazzi and Uni mascot. These are the ones (except the special global cases) that can be limited or expanded by the numbers of community lot objects. Role Sims can be either homeless or residents with proper households. They are not usually considered playable as their role assignment would then become unstable. Role Sims tend to work really long shifts 7 days/wk, at least by default.
Homeless Sims is a category that overlaps the others. It includes (all) Service Sims, (some, usually most if not all) Role Sims, homeless co-workers and bosses (commuters), street performers, some special more unreachable sims like taxi, school bus, carpool, and limo drivers. Homeless sims don't care about refrigerators because they do not live anywhere on-screen. When a homeless sim of any type is finished performing their function or working their shift, they go off-screen to hibernate. You may see them driving off the map or to some special spots on it before they disappear. Sometimes they will be called upon to do other things like populate community lots in their off-time or become zombies during a full moon.
What can confuse things is if you have any LN type apartment buildings (usually highrises but they don't have to be), then some homeless NPCs as described above will appear to occupy the NPC only units that are blackened out inside but reachable by way of the callboxes. But those aren't real households, the sims are just going there instead of off the map to hibernate, thus giving the feeling of a busy apartment building with all the coming and going.
The homeless "household," actually there's a few such, is a virtual one that consists of all of these sims together (except any Role Sims who do happen to be proper residents), its money keeps getting refreshed so these sims can concentrate on their functions and not worry about living expenses, and it cannot have any babies, toddlers, or pregnancies. Or refrigerators.
When we talk about NRaas SP and putting a cap on the world population, we mean the resident population only. Not the Service Pools and not the homeless sims.
The game's RAM usage can be checked like any other program using the Task Manager. If the usage is showing by percentages, right-click on the column to change it to actual MB/GB values.