LiteSpeed Technologies
Download Download     Blog Blog     Wiki Wiki     Forum Forum     Store     Contact Contact    

Go Back   LiteSpeed Support Forums > LiteSpeed Web Server > General > Swapping

Reply
 
Thread Tools Display Modes
  #1  
Old 10-16-2007, 09:33 AM
Giorgi Giorgi is offline
Member
 
Join Date: Oct 2007
Posts: 44
Question Swapping

Hi there

I have some questions about swapping...

I am running 3gb RAM/Fedora 6/Core duo

1. I wonder what is: Max I/O Buffer Size is this RAM memory that litespeed can use to handle big files? So, if the limit is reached then litespeed will begin to dump in TMP directory and use it as RAM I guess?

2. What will later clean Swapping Directory ? how can I speed up cleaning TMP directory and is it recommended?

3. My server must handle large file uploads (650mb) what would you recommend? should I increase Max I/O Buffer Size or increase TMP directory size?

Thank you
Reply With Quote
  #2  
Old 10-16-2007, 09:48 AM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,590
Quote:
1. I wonder what is: Max I/O Buffer Size is this RAM memory that litespeed can use to handle big files? So, if the limit is reached then litespeed will begin to dump in TMP directory and use it as RAM I guess?
Yes,
Quote:
2. What will later clean Swapping Directory ? how can I speed up cleaning TMP directory and is it recommended?
You do not need to. It should not have big impact on performance, and LSWS will avoid using it whenever possible.

Quote:
3. My server must handle large file uploads (650mb) what would you recommend? should I increase Max I/O Buffer Size or increase TMP directory size?
Handling upload of 650mb file via HTTP then processing with PHP is not recommended. It is not efficient with too much overhead, better use FTP for file that big. If you have a few concurrent uploads, your server might be overloaded.
Reply With Quote
  #3  
Old 10-16-2007, 09:50 AM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,590
Quote:
3. My server must handle large file uploads (650mb) what would you recommend? should I increase Max I/O Buffer Size or increase TMP directory size?
In theory, larger I/O buffer should be better, but I think it does not matter much what parameter you tune for such large file. TMP directory size will grow automatically as long as there are enough free space.
Reply With Quote
  #4  
Old 10-16-2007, 11:41 AM
Giorgi Giorgi is offline
Member
 
Join Date: Oct 2007
Posts: 44
Hm...

I have big problem, you see I am running Lsws enterprise on my file hosting site, it must accept that kind of files (650mb) upload via flash, but after about 1 hour of uploading I get IO error with filename

in my admin panel there is:

Code:
2007-10-16 22:31:10.800 ERROR [89.232.19.40:1509-0#APVH_www.mysite.com] out of swapping space while reading request body!
so what do you advice me to do?
Reply With Quote
  #5  
Old 10-16-2007, 12:03 PM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,590
Please try setting "Max I/O buffer size" to "0", yes "zero", the swapping space will be limited by available disk space under /tmp.
Performance wise, you may not notice big difference unless the disk is too busy, server is disk I/O bound.
Use a dedicate disk for /tmp/lshttpd will help.
Reply With Quote
  #6  
Old 10-16-2007, 12:49 PM
Giorgi Giorgi is offline
Member
 
Join Date: Oct 2007
Posts: 44
Quote:
Originally Posted by mistwang View Post
Please try setting "Max I/O buffer size" to "0", yes "zero", the swapping space will be limited by available disk space under /tmp.
Performance wise, you may not notice big difference unless the disk is too busy, server is disk I/O bound.
Use a dedicate disk for /tmp/lshttpd will help.

So I should consider increasing tmp partition?
Reply With Quote
  #7  
Old 10-16-2007, 12:54 PM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,590
You don't have to. You can relocate the swap directory to somewhere else if you want.

http://www.litespeedtech.com/docs/we...l/#swappingDir
Reply With Quote
  #8  
Old 10-16-2007, 03:13 PM
Giorgi Giorgi is offline
Member
 
Join Date: Oct 2007
Posts: 44
Quote:
Originally Posted by mistwang View Post
You don't have to. You can relocate the swap directory to somewhere else if you want.

http://www.litespeedtech.com/docs/we...l/#swappingDir
Now I am confused...

1. I thought that error I posted was caused because that I dont had enough space on tmp partition... is not that right?

2. and I have 3gb RAM, why litespeed wont use it at first place and then start to swap to tmp?
Reply With Quote
  #9  
Old 10-16-2007, 06:45 PM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,590
Quote:
Originally Posted by Giorgi View Post
1. I thought that error I posted was caused because that I dont had enough space on tmp partition... is not that right?
No, when buffer memory was used up in the middle of a request, this error will occur. LSWS cannot switch from buffer memory to swap memory in the middle of a request. Some area can be improved in the future.

Quote:
2. and I have 3gb RAM, why litespeed wont use it at first place and then start to swap to tmp?
If LSWS uses all 3gb RAM for the buffer, the server will become extremely slow. So, there is a configurable limit. once the limit is hit, it will start swap to tmp for new requests.

I think we will avoid buffer large request body in the buffer memory, instead, it will go straight to the tmp swap.

Even when swap is used, it is more likely that the swap file is cached in the memory, so the performance hit is minimum, and the OS kernel has more freedom to use system memory efficiently.
Reply With Quote
  #10  
Old 10-16-2007, 07:00 PM
Giorgi Giorgi is offline
Member
 
Join Date: Oct 2007
Posts: 44
so I will need to increase tmp partition... I did so actually... increased it up to 10gb and progress went up to 83% then IO error occured again (before it only went up to 50%)

I dont understand why more than 10gb of tmp is needed to upload just 650mb file...

maybe something else is generating this error...

can Connection Timeout (secs) trigger that? I have it at 10 000 seconds... (650mb needs about 3.50 hours to upload)

I guess 10 000 seconds is hard limit, is there anyway to increase it further?
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 03:59 AM.



- Archive - Top
© Copyright 2003-2011 LiteSpeed Technologies, Inc. All rights reserved. Privacy Policy.