FSchumacher commented on issue #5816:
URL: https://github.com/apache/jmeter/issues/5816#issuecomment-1528726298

   > > Please tell us, what you do in `JmeterMain#createNewFile`. If you are 
registering files via `FileServer`, you have to make sure to release them, once 
they are not needed anymore. Otherwise you might explode your heap, as your 
memory dump shows.
   > 
   > `set HEAP=-Xms4g -Xmx4g -XX:MaxMetaspaceSize=256m`
   > 
   > I registering files via` java.io.FileInputStream`, Not using any Jmeter 
methods 。Last night i use `fileServer.closeFiles();` to release is ok now, I 
guess there was a problem with Jmeter uploading the byte stream. The file in 
the store before the upload started, but there was no automatic release after 
the upload ended
   > 
   > 
![image](https://user-images.githubusercontent.com/3906620/234151330-923bf1f5-406b-4e71-bcd6-ea918c4dd7af.png)
   
   FileServer is meant for sharing files between threads and was designed to 
handle a *small* number of files. At the time, it was created a few thousand 
threads was the maximum you could dream of. Multiply that by a few files per 
thread (it was mainly used for CSV dataset configs, which there are normally 
not that many per test) and you get a low 10.000 number of files. 
   Your use case with millions of files is not a use case, it was thought for. 
So either clean up regularly the files and keep the numbers low (in 
FileServer), or use other means to handle your files. 
   Know, that each open filehandle will consume memory. If you don't need it 
open, close it.
   
   All in all, I read your comment, as you have solved your problems with heap 
consumption, so I close this issue. Feel free to reopen it, if you still have 
questions about this. 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@jmeter.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to