I'm speaking as a guy who has been training for approximately 9 years. I'm a purple belt at the moment. I'm fairly small in size (5'7 and 135-140lbs).
1. The first thing that will help you is think about progress compared to yourself. Someone who trains 3x or more versus your 2x a week is generally learning more than you. Instead of looking at how you fair versus others all the time, you should also look at the techniques you may have become somewhat proficient at. You may not be hitting back takes every where, but look at the small things. Has your hip escape improved? Did you escape properly? That is still progress. 2x will create progress, but just understand it's slow. Once you realize this, it will help you feel less discouraged. I used to train 5-6x a week, sometimes twice a day. As my career began and I got older, I'm training 3-4x a week. There are blue belts who I was tapping a year ago who now beat the shit out of me without breaking a sweat. They're training 2-3x a day/6 days a week. I wasn't surprised they eventually surpassed me. I'm OK with that.
2. Now, if you're training less...you have to be much more intelligent with your training. You have to be very independent too. You can't rely on coming to class alone to get better. If you're in a traditional BJJ school, the techniques are likely taught in a scattered fashion that makes learning extremely hard. Take learning into your own hands. For the hours I could not train, I added extra things (as some suggested) outside of class. I added lots of studying of techniques. There is so much material to view out there. I find BBs that play styles that are like what I prefer. I watch the crap out of them and mimic. Now you need to find techniques and piece them together. When I started, I always managed to snag a half guard and hang on before being smash passed. Naturally, it made sense for me to develop a half guard arsenal. I understood that being on bottom, I must first be strong with my defence. The longer I can maintain my guard, the more chance I give myself to set up a sweep. Look at your weakness (or most weak at the moment) and strive to fix those.
3. Leading from point 2, go to class with a purpose. Purposeless training, in my mind, would be me going to class and just getting a sweat on. I'm not working on anything...I'm just letting it all flow out. Go to class with a technique in mind. I might go to class with my crucifix game in mind. The goal of all rolls is to get to this spot. Then I progress next month and then work to finishing from the crucifix once I can get into it fairly decently. I spend one month focused on top techniques (just passing only, takedowns...) and the next month I do guard work (focus on guard retention, sweeps only). Also make use of the different partners you have. When you roll with less experienced people, you should try to exert your offensive game on them. When you roll with higher belts, you can focus on your defensive ability. You can make it a game for yourself. Maybe you're going to hit 5 triangles today. A finish is 1. Getting into the lock without a finish is 0.5. If you can get to class early, practice a technique and review with a friend. If you have a few extra mins at the end, find that same friend and do some more. Oh yeah, asks LOTS of questions. If you find someone who does something well, ask them how they do it. Maybe that guy/girl slices through your guard like better...well ask them, what they do see that makes passing so easy? Analyze and think.
4. See if you can add an extra session. Maybe it means doing a drop in somewhere. Maybe it means going to a friends basement. Do it. It's better than nothing. Generally, more mat time is going to help.
5. Do extra physical work outside of the class. I practice Ashtanga Yoga outside of class to keep my body mobile. If you sit all day at a desk and then go to class, it's pretty rough. Anything extra to keep you moving will help with a general exercise base.
And don't give up. Everybody is capable of doing BJJ. I don't ever anticipate winning gold medals but I'm going to learn BJJ as best as I can. I'm OK with all this. I'm ok being the best average BJJ-er. My first few years sucked the most. I was always getting smashed, passed, tapped. I still get smashed btw, but not as hard and much. My buddies all advanced far ahead of me. But I kept training because as long as you train (you make progress, slow or not), you will get somewhere. When you quit, you stop and get absolutely nowhere. It's only now that I feel somewhat decent at this BJJ thing. BJJ has been an amazing journey. I've learned to think more and analyze everything to problem solve. I have mental toughness that stems from battling people on a daily basis on the mats. I believe I've grown up learning about respect and humbleness from training. Most of all, once you you embrace the struggle, you will be amazed at how much you can overcome. Good luck.
Most of all, HAVE FUN. Class is training. Learn the technique in class and just try to go for it. It's awesome to tap. Tapping ls learning. Tap, and try again.