bandwidth

Python Requests/urllib — monitoring bandwidth usage

我们两清 提交于 2019-12-18 19:53:42
问题 I want to log the total bytes downloaded and uploaded by my Python script. total_downloaded_bytes = 0 def bandwidth_hook(r, *args, **kwargs): global total_downloaded_bytes total_downloaded_bytes += len(r.content) req = requests.session() req.hooks = {'response': bandwidth_hook} The above code doesn't take into account HTTP compression (if I'm right) and the size of headers. Is there a way to count total uploaded and downloaded bytes from a requests.session? If not, what about a script-wide

What is the most accurate method of estimating peak bandwidth requirement for a web application?

时光毁灭记忆、已成空白 提交于 2019-12-18 03:43:22
问题 I am working on a client proposal and they will need to upgrade their network infrastructure to support hosting an ASP.NET application. Essentially, I need to estimate peak usage for a system with a known quantity of users (currently 250). A simple answer like "you'll need a dedicated T1 line" would probably suffice, but I'd like to have data to back it up. Another question referenced NetLimiter, which looks pretty slick for getting a sense of what's being used. My general thought is that I

Does software prefetching allocate a Line Fill Buffer (LFB)?

那年仲夏 提交于 2019-12-17 22:19:35
问题 I've realized that Little's Law limits how fast data can be transferred at a given latency and with a given level of concurrency. If you want to transfer something faster, you either need larger transfers, more transfers "in flight", or lower latency. For the case of reading from RAM, the concurrency is limited by the number of Line Fill Buffers. A Line Fill Buffer is allocated when a load misses the L1 cache. Modern Intel chips (Nehalem, Sandy Bridge, Ivy Bridge, Haswell) have 10 LFB's per

How to measure a Website Bandwidth (Upload+Download) in MB using C#/VB.Net programmatically?

瘦欲@ 提交于 2019-12-17 18:29:44
问题 Hope that everybody is fine here. I am writing a windows service in C#/VB.Net that aims at measuring bandwidth consumption for all WebSites on localhost and store their statistics for upload , download etc on local/remote database. Target Platforms include only Windows Server 2003, 2003 R2, 2008 and 2008 R2. I have searched a bit on this thing and found the following: Using SNMP mgmtapi.dll which is found in Windows 2003 Using a custom Network Driver to collect statistics. Please guide on the

EC2 instance types's exact network performance?

懵懂的女人 提交于 2019-12-17 07:58:45
问题 I cannot find exact network performance details for different EC2 instance types on Amazon. Instead, they are only saying: High Moderate Low What does this even mean? I especially want to know the exact amount of Traffic-OUT on each instance type. I need to do live streaming and my stream bit rate will be 240kbps. So I need to know which instance type can handle how many concurrent viewers. 回答1: Bandwidth is tiered by instance size, here's a comprehensive answer: For t2/m3/c3/c4/r3/i2/d2

How to programmatically limit bandwidth usage of my c# application?

萝らか妹 提交于 2019-12-17 07:15:48
问题 I've got a backup application here which connects to various webservices and downloads/uploads files from ftp or http servers. What is the easiest way to limit the bandwidth usage of my application? I need to do that because the application once installed and running will be slowing down internet access for all office people, which eventually will get me into hell. So I'd like to implement a speed-limit which is active during the work-hours and gets disabled at night. 回答1: What you are

Difference between Data transfer cost and Bandwidth costs in AWS

随声附和 提交于 2019-12-13 04:46:06
问题 What is the difference between Data transfer costs and Bandwidth costs in AWS?? When I view my AWS bills, I see there are 2 types of expenses in Data Transfers tab, one of Data Transfer and one on Bandwidth costs. I tried to search a lot on this but could not get a clear demarcation on the difference between the two. 回答1: Yes, that is confusing! The top Data Transfer part seems to be data transfer between regions. From the Amazon EC2 pricing page: Data Transfer OUT From Amazon EC2 To Another

What's a good way to profile the connection speed of Web users?

不羁岁月 提交于 2019-12-12 18:24:10
问题 I have a client whose desired Web UI is graphically intense; we would like to gather statistics on the average bandwidth of those connecting to the site. Is there an easy way to do that? The "simplest thing that could possibly work" would seem to be a Flash or Silverlight component that times the download of a file of some size (say 200K), then POSTing the result to a URI that saves the data. Will that work? Should I write my own or is there an easy drop-in element that I can download from

How to measure network throughput during runtime

谁说胖子不能爱 提交于 2019-12-12 10:15:54
问题 I'm wondering how to best measure network throughput during runtime. I'm writing a client/server application (both in java). The server regularly sends messages (of compressed media data) over a socket to the client. I would like to adjust the compression level used by the server to match the network quality. So I would like to measure the time a big chunk of data (say 500kb) takes to completely reach the client including all delays in between. Tools like Iperf don't seem to be an option

PHP resize and watermarking images on the fly or create multiple versions?

若如初见. 提交于 2019-12-12 06:47:18
问题 I have a collection of 500+ images which have been re-sized to a maximum of 800px x 533px with a need to display thumbnails of these in a variety of sizes depending on the number in a particular category, so a section width of say 650px is filled in either 2/3/4 columns of photos. These images will are planned to bed used on a number of different domains each with a seperate watermark. Therefore i wrote a script which re-sizes images based on certain parameters (width / height / aspect) and