Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 Programming Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #11  
Old 01-12-2004, 09:05 PM
cirisme cirisme is offline
 
Join Date: Jan 2003
Posts: 136
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Milhouse
That's what i assumed as well.

Which is not good for me. i need ti to essentially effect all attachements.

Any ideas from the gurus here?
Try finding this:

PHP Code:
echo $attachmentinfo[filedata]; 
and changing to:

PHP Code:
// UploadBandwithLimitHack 
 // Original line: echo $attachmentinfo['filedata']; 
 
$bandwidth 30// Desired max. bandwidth in KB/s. 
 
$i 0
 while (
$i strlen($attachmentinfo['filedata'])) { 
   echo 
substr($attachmentinfo['filedata'], $i1024); 
   
$i += 1024
   
flush(); 
   
usleep(1000000/$bandwidth); 
 } 
 
// UploadBandwidthLimitHack 
This is essentially what was posted above, but for the filedata with vb2 itself
Reply With Quote
  #12  
Old 01-12-2004, 09:30 PM
Milhouse Milhouse is offline
 
Join Date: Feb 2003
Posts: 42
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I did that. All it did was make the download take longer to start, but once it started ti downloaded at the top speed it could and not the 30k i had set.
Reply With Quote
  #13  
Old 01-12-2004, 09:31 PM
Zachery's Avatar
Zachery Zachery is offline
 
Join Date: Jul 2002
Location: Ontario, Canada
Posts: 11,440
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by cirisme
Try finding this:

PHP Code:
echo $attachmentinfo[filedata]; 
and changing to:

PHP Code:
// UploadBandwithLimitHack 
 // Original line: echo $attachmentinfo['filedata']; 
 
$bandwidth 30// Desired max. bandwidth in KB/s. 
 
$i 0
 while (
$i strlen($attachmentinfo['filedata'])) { 
   echo 
substr($attachmentinfo['filedata'], $i1024); 
   
$i += 1024
   
flush(); 
   
usleep(1000000/$bandwidth); 
 } 
 
// UploadBandwidthLimitHack 
This is essentially what was posted above, but for the filedata with vb2 itself
whats the point? this would force users to WAIT longer to download an image or a file, why not let them get it asap ..?
Reply With Quote
  #14  
Old 01-12-2004, 10:03 PM
Milhouse Milhouse is offline
 
Join Date: Feb 2003
Posts: 42
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Faranth
whats the point? this would force users to WAIT longer to download an image or a file, why not let them get it asap ..?
That is exaclty what i experience when downloading. I no want them to wait longer I just want to slow the speed at which they get it at.

Most users have a 100k/s line or higher... I want them to only be able to download my attachements at like 40k or so. Simply because we have files of 5+ megs..

when we have 100 users downloading those files at 100+k/s you can imagine what hapepsn to our line.
Reply With Quote
  #15  
Old 01-12-2004, 11:07 PM
Zachery's Avatar
Zachery Zachery is offline
 
Join Date: Jul 2002
Location: Ontario, Canada
Posts: 11,440
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Milhouse
That is exaclty what i experience when downloading. I no want them to wait longer I just want to slow the speed at which they get it at.

Most users have a 100k/s line or higher... I want them to only be able to download my attachements at like 40k or so. Simply because we have files of 5+ megs..

when we have 100 users downloading those files at 100+k/s you can imagine what hapepsn to our line.
if anything slowing them down would put more stress on your line, a burst at 400kbps would get that file finished much faster
Reply With Quote
  #16  
Old 01-12-2004, 11:19 PM
Milhouse Milhouse is offline
 
Join Date: Feb 2003
Posts: 42
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Faranth
if anything slowing them down would put more stress on your line, a burst at 400kbps would get that file finished much faster

Problem is we are getting bursts as high as 1400kbps and the datacenter is wanting more money.

Specially when these bursts are at times consecutive for like 30 minutes.

Also because of the high bursts at time the site it self becomes rather slow. While server loads at a minimum. What is happenign is some users are using up all the of the line downloading and leaving nothing or barely nothing for users who are just surfing. causing the site to drag.

If i could cap the downloads then it would be equal to all.

I have manage to get server side files to download at 40k/s if bigger then 1 meg, however that does not effect mysql attachements.

Any help would really be appricated.
Reply With Quote
  #17  
Old 01-13-2004, 02:18 AM
Milhouse Milhouse is offline
 
Join Date: Feb 2003
Posts: 42
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Is this not possible? Such hack?
Reply With Quote
  #18  
Old 01-13-2004, 02:27 AM
Zachery's Avatar
Zachery Zachery is offline
 
Join Date: Jul 2002
Location: Ontario, Canada
Posts: 11,440
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Milhouse
Is this not possible? Such hack?
please wait more than 4 hours to bump a post,

maybe its time to find a differnt host with a bigger pipe. >.<
Reply With Quote
  #19  
Old 01-13-2004, 03:42 AM
Milhouse Milhouse is offline
 
Join Date: Feb 2003
Posts: 42
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Faranth
please wait more than 4 hours to bump a post,

maybe its time to find a differnt host with a bigger pipe. >.<

Sorry about that.
Reply With Quote
  #20  
Old 01-13-2004, 04:38 PM
cirisme cirisme is offline
 
Join Date: Jan 2003
Posts: 136
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Milhouse
I did that. All it did was make the download take longer to start, but once it started ti downloaded at the top speed it could and not the 30k i had set.
It won't change download speed... but unlike the orginal, it will only give the download in sections at a time.

The original would only do this with the header which is why it took longer to start.

At least check the code to see it's different
Reply With Quote
Reply


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. The time now is 12:55 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04110 seconds
  • Memory Usage 2,265KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (4)bbcode_php
  • (8)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete