Re: allocating 14KB memory per packet compression/decompression results in vm_fault

From: Giorgos Keramidas (keramida_at_ceid.upatras.gr)
Date: 11/04/05

  • Next message: Ruslan Ermilov: "Re: troubles with ng_fec on -current"
    Date: Fri, 4 Nov 2005 14:50:16 +0200
    To: kamal kc <kamal_ckk@yahoo.com>
    
    

    On 2005-11-03 22:56, kamal kc <kamal_ckk@yahoo.com> wrote:
    >>> for my compression/decompression i use string tables and
    >>> temporary buffers which take about 14KB of memory per
    >>> packet.
    >>
    >> If you're allocating 14 KB of data just to send
    >> (approximately) 1.4 KB
    >> and then you throw away the 14 KB immediately, it
    >> sounds terrible.
    >
    > yes that's true.
    >
    > since i am using the adaptive LZW compression scheme it
    > requires construction of string table for
    > compression/decompression. So an ip packet of size 1500 bytes
    > requires a table of size (4KB + 4KB + 2KB = 12KB).

    I may be stating the obvious or something totally wrong, but
    couldn't the string table be constructed once instead of each
    time a packet goes down? It is my intuition that this would
    perform much much better than re-doing the work of the string
    table each time a packet goes out.

    > what would be the best possible way to allocate/deallocate 14KB
    > memory per packet without causing vm_faults ??

    Bearing in mind that packets may be as small as 34 bytes, there's
    no good way, IMHO.

    - Giorgos

    _______________________________________________
    freebsd-net@freebsd.org mailing list
    http://lists.freebsd.org/mailman/listinfo/freebsd-net
    To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org"


  • Next message: Ruslan Ermilov: "Re: troubles with ng_fec on -current"

    Relevant Pages

    • Re: how to store list of varying types
      ... When there's a variable-length string, ... typedef struct { ... pointer null, and the second one the CString object. ... then have to finish constructing the packet by copying the two data objects ...
      (microsoft.public.vc.mfc)
    • Can anyone help me out?
      ... int main{ ... string fname; ... Packet *packet = new Packet; ... packet->package(filename, filesize, buffer); ...
      (comp.unix.programmer)
    • Re: Open Sound Control
      ... \0s at the end of the string to pad it to a 32bit boundary. ... 32bit int)) will not work with the OSC spec. ... puts [string length $packet] ... The only non-standard feature is that the blob is displayed in hex ...
      (comp.lang.tcl)
    • Re: allocating 14KB memory per packet compression/decompression results in vm_fault
      ... > since i am using the adaptive LZW compression scheme it ... So an ip packet of size 1500 bytes ... couldn't the string table be constructed once instead of each ...
      (freebsd-hackers)
    • Re: how to send 1billion characters using Winsock
      ... "Winsock Client Server Application Problem". ... DataToSend As String ... could get multiple "packets" in one DataArrival event, ... ' Add the packet separator char ...
      (microsoft.public.vb.general.discussion)