B4J Question b4j without a swap file?

kostefar

Active Member
Licensed User
Longtime User
Dear All,

If I turn off my swap file, I get memory errors from java when using b4j. Is there a way to run b4j projects without a swap file?

The reason why I want to unload the swap file is a totally different story.. having audio glitches that can be caused by a thousand different things. One of the possible culprits, next to aLOT of stuff I´ve tried over the last 6 months, is the swap file.

EDIT: Now this is strange. I started playing around again with a system without a swap file, but this time getting no errors. Maybe it´s all good now after all.
 
Last edited:

DonManfred

Expert
Licensed User
Longtime User
What kind of tutorial is this?
 
Upvote 0

OliverA

Expert
Licensed User
Longtime User
Is there a way to run b4j projects without a swap file?
My guess is that the system ran out of available memory.
Add more memory to your machine. If you are turning off the swap file, then the memory limit of your machine is the physical memory installed in your system. When the system runs out (too many programs running, a program that is a memory hog trying to get more memory), it has no other place to turn to (no swap) and therefore programs will crash/report out of memory issues.
 
Last edited:
Upvote 0

kostefar

Active Member
Licensed User
Longtime User
Add more memory to your machine. If you are turning off the swap file, then the memory limit of your machine is the physical memory installed in your system. When the system runs out (to many programs running, a program that is a memory hog trying to get more memory), it has no other place to turn to (no swap) and therefore programs will crash/report out of memory issues.

Yeah, it was just me thinking that there´d be some requirements of java for a certain amount of swap file size. The funny thing is that when I tested it a while back, I ran into these errors even with a swap file size of 16 GB - on top of my 16 GB of physical memory. Had to set it to 24 GB before it would run normal again.
I do like to have alot of things open, especially in chrome, but that it´d go as high as beyond 32 GB is a bit hard to imagine.
Currently, 10,4 GB is in use and I got spotify, librecalc, 5 b4j sessions and chrome with 15 tabs open. Keeping an eye on whether if something gets it to go against the ceiling, and of course if the audio starts to crackle again cause then there´s no point for me in turning off the swap file at the end.
 
Upvote 0

OliverA

Expert
Licensed User
Longtime User
Curiosity: Is the swap drive spinning platters or SSD? If it is not an SSD, you could get an SSD and put the swap on it. The cost would be a wash with an extra 16GB physical memory and the SSD would give you more available space (in case needed). If you already have an SSD, it would be odd that swap space would mess with the audio (must be one heck of an audio setup).
 
Upvote 0

stevel05

Expert
Licensed User
Longtime User
What is the Audio setup? do you have a separate sound card?
 
Upvote 0

kostefar

Active Member
Licensed User
Longtime User
Curiosity: Is the swap drive spinning platters or SSD? If it is not an SSD, you could get an SSD and put the swap on it. The cost would be a wash with an extra 16GB physical memory and the SSD would give you more available space (in case needed). If you already have an SSD, it would be odd that swap space would mess with the audio (must be one heck of an audio setup).


Yeah, I can´t say if it´s the swap file but it seems not. Already had some clicks and pops now after disabling the swap.
The audio setup was the onboard audio. Then I installed my old EMU 1212m card, tried routing through the ASIO driver as well, but problem persisted.
Also bought a new LAN card to use instead of the onboard one, no difference. So I´m back to the onboard audio again, as there were too many issues with the 1212m.
All of my HD´s are oldfashioned ones, no SSD there. But if the issue is not the swap file, there´d be no need for an SSD I assume although it could increase the system speed. But SSD´s you don´t wanna be constantly writing and reading from I´ve heard, ain´t that true?

And perhaps I should mention that this problem begins after one day, one week - you can never know and then I need to reboot. It seems to be impacted by network activity though. And, for the audio: It´s all kinds of audio, even played from the same computers collection of songs as well as from my USB turntable.

Sorry but I think we´re getting too much off topic now in terms of this being a b4j forum.
 
Upvote 0

stevel05

Expert
Licensed User
Longtime User
I presume you've been through the usual things, Sound card driver update, video card driver update? What version of Windows are you running on (I assume it's Windows)?
 
Upvote 0

kostefar

Active Member
Licensed User
Longtime User
I presume you've been through the usual things, Sound card driver update, video card driver update? What version of Windows are you running on (I assume it's Windows)?

Yes indeed, updated all I could. It started about half a year ago, so it´s probably got to do with some windows update. There´s probably still things to try for resolving it, but I´d say that I´ve done most of everything that you can find by searching on the internet for others with the same problem. It´s windows 10, yes.
 
Upvote 0

OliverA

Expert
Licensed User
Longtime User
Sorry but I think we´re getting too much off topic now in terms of this being a b4j forum
You always have Chit Chat! This is a diverse community and with a different title, this may attract some more people with know how to your post. Plus, I may give you my quirky suggestion.
 
Upvote 0

kostefar

Active Member
Licensed User
Longtime User
You always have Chit Chat! This is a diverse community and with a different title, this may attract some more people with know how to your post. Plus, I may give you my quirky suggestion.

Sure, I was just thinking that we´d be told to take the hardware talk somewhere else.
 
Upvote 0

stevel05

Expert
Licensed User
Longtime User
Wow, Just searched the internet and it looks like a minefield. So many people with similar problems. I thought bad audio was behind us with 64 bit mega machines. Just goes to show that the powers that be can mess up anything if they try hard enough. Just in case you haven't come across this page it seems to offer a few reasonable suggestions.

http://www.tomshardware.co.uk/forum/id-2753323/windows-audio-stuttering-issues.html

I hope you get it sorted.
 
Upvote 0

kostefar

Active Member
Licensed User
Longtime User
Wow, Just searched the internet and it looks like a minefield. So many people with similar problems. I thought bad audio was behind us with 64 bit mega machines. Just goes to show that the powers that be can mess up anything if they try hard enough. Just in case you haven't come across this page it seems to offer a few reasonable suggestions.

http://www.tomshardware.co.uk/forum/id-2753323/windows-audio-stuttering-issues.html

I hope you get it sorted.

Thanks, it looks familiar but can´t hurt to read through it again. Wifi I don´t have any of here on this machine and I´ve done the other things people suggest, except for disabling the digital output but I doubt that will have an impact since the EMU 1212m suffered from the same issues.
But I got inspired here and went over my network interfaces again and also checked one more time what´s in the computers startup. I found a component there called Netsession_Win which I disabled after reading that nobody seems to recommend this for anything good, and then removed 18 (!) Virtualbox interfaces, probably one for each update Virtualbox had, left the one currently being used by genymotion and rebooted.
I noticed a big boost in speed when I went back into Windows: For instance loading an excelsheet in librecalc for the first time is usually a process the system decides should take 2 minutes while other things are being loaded. This time it happened in seconds.
So let´s see, maybe all these adapters and Netsession_Win has got something to do with the crackling audio. The next day(s) will tell.
 
Upvote 0
Top